Web Hosting Talk







View Full Version : likely simple php issue - any help!?


Mekhu
08-12-2003, 11:53 PM
Ok, I am currently working with a new directory script and like usual I like to get in a modify the looks until it's exactly how I want.

Here's the problem. I have placed the below code into my .html file which then interacts with the .php file. This is how I skin the software.

Here's what I am adding into the .html file:


<strong><a href="review.php?id=<%id%>">Review
It</a></strong> - <strong><a href="detail.php?id=<%id%>">
Rate It</a></strong>


How come the id will not get pulled into my url!? Just shows up as "detail.php?id=" in my browser?

Burhan
08-13-2003, 12:17 AM
A few thoughts.

First try replacing <% id %> with either :

<?php echo $id; ?>

or the shorthand <?= $id ?>

Secondly, in order for the echo to work (or the id to change) the script needs to be run through the php parser. So, unless .html files are also parsed as php files, this will not work.

Mekhu
08-13-2003, 12:26 AM
Thank you so much for your time, but I just figured it out.

<%id%> should have been <%link_id%>