I'm cooperating with the construction of a petsite and I've some doubts about the construction of shops, like, in the shops.php it would show an image with links to the Shop's id's, but my real question is, from the main page of the shops, shops.php, how would I do id's like shops.php?id=idnumber here? Thanks, I'd need a page .php to add the shops without having to acess my account in my host. Thanks
Shops id's
Moderator: General Moderators
Shops id's
Hello!
I'm cooperating with the construction of a petsite and I've some doubts about the construction of shops, like, in the shops.php it would show an image with links to the Shop's id's, but my real question is, from the main page of the shops, shops.php, how would I do id's like shops.php?id=idnumber here? Thanks, I'd need a page .php to add the shops without having to acess my account in my host. Thanks
I'm cooperating with the construction of a petsite and I've some doubts about the construction of shops, like, in the shops.php it would show an image with links to the Shop's id's, but my real question is, from the main page of the shops, shops.php, how would I do id's like shops.php?id=idnumber here? Thanks, I'd need a page .php to add the shops without having to acess my account in my host. Thanks
- speedy33417
- Forum Contributor
- Posts: 128
- Joined: Sun Jul 23, 2006 1:14 pm
You're going to need a database if you want to add anything. Any variables passed will be destroyed as soon as your visitor closes the browser.
Once you have your database you want to pull out the data and save them in a variable: $shopid and $shopname.
Then your code would be something like this:
Then shops.php would start something like this:
Hope this helps.
Once you have your database you want to pull out the data and save them in a variable: $shopid and $shopname.
Then your code would be something like this:
Code: Select all
echo "<a href=\"http://www.mysite.com/shops.php?shopid=" . $shopid . "\"><" . $shopname . "></a><br>" . "\n";Code: Select all
$shopid = $_GET['shopid'];