[thelist] html to php
Ray Hill
ray at opengrid.com
Mon Sep 10 20:01:00 CDT 2001
> i've got a site map going on in one frame and what i want to
> do is when someone clicks on the image in the site map, i would
> like it to send a sql query to a php page in another frame.
You could wither have a separate PHP page for each SQL command and use that
in the links or, more likely, have just one page with a switch statement to
choose the SQL command, and pass the variable in through the query string.
Something like this:
content.php?action-whatever
<?
// Assume the $action variable is being passed in the query string
// and do a switch to match up the SQL statement for the given value.
switch () {
case "frozenfoods":
// SQL commands for frozenfoods here.
break; case "freshfoods":
// SQL commands for freshfoods here.
break; default:
// Default stuff here
break;}
}
?>
--ray
More information about the thelist
mailing list