|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Retreiving entry from database using PHP POST function
Hi all,
Just wondering if there is a way of retreiving a entry from a mysql database using a post function from a previous html page on the site? I am using: $query = 'SELECT * FROM application ORDER BY id DESC LIMIT 1'; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); at the moment but want to change it so it retreives an entry with a specific name eg. $Nameofapplicant from a previous POST function. I have another PHP page that reteives the data from using this command: ?php echo $NameofApplicant; is there a way of doing this eg SELECT * FROM application WHERE name_of_applicant = $NameofApplicant ?? Thanks John |
|
#2
|
||||
|
||||
|
PHP Code:
I assume your variable is a String; I've surrounded it with quotes in the SQL. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Retreiving entry from database using PHP POST function |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|