Jump to content

$_GET


doddsey_65

Recommended Posts

i have a page called tutorials.php. When a user clicks one of the displayed tutorials they are sent to tutorials.php?id=thetutorialid

 

thetutorial id is taken from the database column id.

 

however i want it to look something like tutorials.php?name=tutorialname

 

i thought of changing the $_GET['id'] to $_GET['tutorialname'] but it didnt work.

 

I also changed the hyperlink from tutorials.php?id=<? echo $id; ?>"> to tutorials.php?name=<? echo $tutorialname; ?>">

 

Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/203873-_get/
Share on other sites

okay my host doesnt allow .htaccess so i need something different.

 

like i said i changed if (isset($_GET['id'])) to if (isset($_GET['tutorialname']))

 

and changed <a href="tutorials.php?id=<?php echo $row->id; ?>"> to

<a href="tutorials.php?name=<?php echo $row->tutorialname; ?>">

 

but its not working, the content doesnt show up when the page loads.

Link to comment
https://forums.phpfreaks.com/topic/203873-_get/#findComment-1067792
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.