On Jul 24, 2003, "Matt Hedges" claimed that:
|Many hanks for ya'lls help earlier.
|
|I've figured out how to pull the data and edit it:
|http://www.hedges.org/aoii/olemiss/updatesister.php
|
|However, for some reason I can't get it to edit whatever row. In the code
|(pasted below) I have to specificy $id=row to edit...
|
|I can't figure out how to make it to where the user can select the field
|(which is the id/row) and edit it. I've tried putting a ?id=# at the end of
|the url, but that doesn't work... Any thoughts? So what I want is where it
|says
|
|$id=1
|
|to have it someway where that is a variable that the user can define...
[some code snipped]
| else
| {
| $query = "SELECT * FROM table WHERE id='$id'";
| $result = mysql_query($query)
| or die ("Couldn't execute query.");
| $row = mysql_fetch_array($result);
| extract($row);
| }
|
|Thank you.
|Matt
|
Your page gives me "Warning: extract() expects first argument to be an
array in /c36/mhedges/aoii/olemiss/updatesister.php on line 32." Are you
sure you're using the correct table name? BTW, "table" is a MySQL
reserved keyword, so if it is the table name, it should be enclosed in
backticks: http://www.mysql.com/doc/en/Reserved_words.html
Jeff Harris
--
Registered Linux user #304026.
"lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import"
Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED
Responses to this message should conform to RFC 1855.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php