Jump to content
Larry Ullman's Book Forums

Chapter 2 Creating <A Href='> Hyperlinks To Page Modules


Recommended Posts

Hi Larry,

 

Your book has really helped me  a lot, thank you. My question:

 

Regarding Chapter 2 ('the bootstrap file system section of the chapter') I am very familiar with how the system works, but when creating hyperlinks to other modules that are passing an id value, i cannot seem to figure out how to make work. 

 

For example when you create a normal php file, and you want to pass an id value via a hyperlink, you can do: <a href='myfile.php?id=" . $row->id . " '>Click Here</a>

 

However when attempting that with a module with the name and extension of (myfile.inc.php), it obviously will not work. And i have tried of coarse:

 

<a href='index.php?p=myfile?id=" . $row->id . " '>Click Here</a>

 

and... 

 

<a href='index.php?p=myfile,inc.php?id=" . $row->id . " '>Click Here</a>

 

with no luck. 

 

 

If you can point me in the right direction it would be a big help.

 

Thanks a lot!

Link to comment
Share on other sites

Hello, and welcome to the forums.

It's not working because your syntax is incorrect.

 

You only use a question mark to separate the URL parameters part of the URL from the rest of the URL before it. After that, you need to use ampersands (&) to separate individual name-value pairs.

As such, if you use the following, you should be fine:

<a href='index.php?p=myfile&id=" . $row->id . "'>Click Here</a>
  • Upvote 1
Link to comment
Share on other sites

  • 8 months later...
 Share

×
×
  • Create New...