trying to get a variable

2012-11-09  Source: Original Site  Category:PHP  Views:0 

Advertisement

this code below isnt working and im not getting an error message

any ideas

<?php
$EventID=$_POST['EventID'];

mysql_connect('localhost', 'phpuser', 'phpuser03')or die ("Database connection error");

mysql_select_db('booking');

$sql = "SELECT Price FROM `ticket` WHERE EventID='EventID'";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
echo $row['Price'];
}
?>

Related articles
  • trying to get a variable 2012-11-09

    this code below isnt working and im not getting an error message any ideas <?php $EventID=$_POST['EventID']; mysql_connect('localhost', 'phpuser', 'phpuser03')or die ("Database connection error"); mysql_select_db('booking'); $sql = "SELECT Price F

  • Getting a variable from another function 2012-05-06

    I'm trying to get a variable named 'html' from one function and use it in another. My JavaScript knowledge is limited, so will be grateful for any help Please see code below function createMarker(point, name, label, address, type) { var marker = new

  • jQuery Help getting a variable 2012-06-13

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content="text/html; charset=us-ascii" http-equiv=Content-Type> <META name=GENERATOR content="MSHTML 8.00.6001.18702"></HEAD> <BOD

  • Getting a variable to display result in querry analyzer 2013-03-02

    - I am trying to get a variable to display the result in querry analyzer. Its a simple stored procedure If I run the simple select statement I get the single result, if I use the select with the varaible I get just the completed querry without a resu

  • Getting any variables passed in a url string 2013-03-28

    I am trying to get all variables passed in a url string and wondered how would i do it? I dont know what they are yet and i need to set key as value. Any help?

  • Oracle Trying to get POST Request Variables. 2015-01-07

    I am trying to get the values of POST request variables in the mod_plsql PlsqlRequestValidationFunction. We are trying to scan the variables for Cross Site Scripting attacts (XSS Attacks). For GET Requests we can use OWA_UTIL.GET_CGI_ENV('QUERY_STRIN

  • Oracle Trying to get sysdate- 2yrs and sysdate+2yrs value into variable 2015-04-11

    iam Trying to get sysdate- 2yrs and sysdate+2yrs value into variable.But facing the following issue. Please help me out . Error : ***** p_start_date := select add_months(max(sysdate), -24) from dual; * ERROR at line 6: ORA-06550: line 6, column 25: P

  • ]Notice: Trying to get property of non-object in 2012-01-18

    mates i have a new problem in my project for an e-shop. The message i get is: Notice: Trying to get property of non-object in C:\Program Files\EasyPHP 2.0b1\www\eshop\order_fns.php on line 40 Could not store data, please try again. I try to store dat

  • Oracle Trying to use parameter variable as column identifier in SQL where clause 2012-02-05

    Doing a college project... would really appreciate some help. I am trying to use a variable in the where clause of a select cursor in PL/SQL. The code is this: procedure results(p_search_entry varchar2, p_search_field varchar2) is cursor c_results is

  • How to include JavaScript into PHP to get 2 Variables ??? 2012-05-16

    2 all. im trying for the last couple of days to get 2 simple variables/data into the MySQL Database. Short Description of the Project: we developed a e-learning system for our students. each student has a unique username/password to view the modules

  • Help with getting a variable from an array 2012-07-16

    I have a very complex session array I need to get a variable from. The variable I need is in Bold. I have tried the following but with no luck :confused: $variable = $_SESSION["cart"]["contents"]["28{txt_1}{txt_2}1300{txt_3}1700{txt_4}1{txt_5}Sliding

  • i am not getting the variables value (PHP) 2012-09-27

    this is the simple script , i am trying to execute. But i am getting problem, whatever i type ,i get only authorisation required .But it should get the username password i typed. i am using PHP Version 4.2.2 .i think ,i am not getting the variable va

  • Getting url variables to display without the special characters using JS 2012-10-02

    I am trying to get a series of dynamic digits from page one to page two via the url. below are the codes have been able to come up with. The problem am having however is that the variables from the first page contains two other characters mainly (=)

  • I'm trying to get the Zend debugger to run in eclipse but I get message on windows st 2012-10-22

    I'm trying to get the Zend debugger to run in eclipse but I get message on windows startup "You must load the zend optimizer before the zend de-bugger" However in my php.ini I do that [Zend] ;zend_extension_ts = "C:\xampp\php\ext\php_xdebug.dll" ;XDE

  • Getting the variable into the option box ? 2012-12-26

    I am coding an edit form and I trying to get my option box to display the current contents of the field. The contents have been read from the db and put in the $N_recep var but the option box always shows 0. Is this normal or is there another way to

  • how do i get a variable from a regular ol url? 2013-03-23

    im trying to get the username of the personal profile. the url is example.com/theusername/index.php the "theusername" i want to make into a variable. How do i do that? i want the variable to be called "theusername" so how do i make that into a variab

  • Ubuntu trying to get a feel for piping command output to grep 2013-11-04

    I am reviewing some of the basics and trying to get a "feel" for how output is chained from command to command. I am trying to build a solution with awk To begin let's say that I want to grep the output of top to see if firefox is running... $ top |

  • Trying to get full path value of file in a form... works in IE, not Firefox 2013-12-03

    I'm trying to grab a file path from a form and pass it to hidden variable. To be honest I don't quite remember why I did it this way, but it doesn't matter since both the file element of the form and the hidden element after the passing get the full

  • Curl GET (url) variable 2013-12-22

    having some difficulty in a code with a GET variable. I tried to put the variable in the url and now trying to post it as a get variable seperatly. $cUrl = curl_init(); curl_setopt($cUrl, CURLOPT_URL, 'http://site.com/c.php'); curl_setopt($cUrl, CURL

  • Ubuntu Trying to get f-spot 0.1.11 2014-01-04

    I was trying to get f-spot 0.1.11 (http://f-spot.org/Download) (It's a tar.bz2 file. Apparently, Dapper users have access to it in synaptic, but it isn't there for Breezy. So, I have f-spot 0.1.3 at the moment.) and I was using some ideas I found at