Hello,
I am passing a variable to the new page, when user clicks on the link.
Something like that:
a href=showimage.php?ID=38img src=/some/image.jpg/a
How can I extract all other information out of my database for that ID
in the next page (showimage.php)?
Thanks
SELECT * FROM table WHERE ID = $_GET['ID']
Then create a page to display all of that information. Look at the mysql
functions and learn some PHP. We can't help you without knowing what's in
your table and how you want it displayed, etc...
So keep learning and reading and you'll figure out how
Ahhh! quote that ID number before using it in a query! :)
// for mysql
mysql_quote($_GET['ID']);
---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent:
Or simply just validate it's an integer, like it should be, like you would
do with any user input...
There is no mysql_quote() function...or am I missing something?
---John Holmes...
- Original Message -
From: Scott Hurring [EMAIL PROTECTED]
To: Php-General (E-mail) [EMAIL PROTECTED]
Sorry, i meant: mysql_escape_string( $value )
I use a class to handle accessing the database, and i
named the function $db-quote(...); i keep forgetting
that the actual function call that the class is making ;-)
And yes, validating that it's an integer works also,
but even after pregging vars
5 matches
Mail list logo