Hi,

I have 2 web pages pg1.php & pg2.php and I am providing a link from pg1.php to pg2.php. I am able to navigate but I can't pass parameters.

When the user clicks on the link, I need to pass certain parameters also from pg1.php to pg2.php.

I wrote the code like this in pg1.php:

echo "<a href='http://somewhere/pg2.php?row1=$row1[0]'>CLICK ME!</a>";

Now, when I click the link, I could see the url with the parameter getting displayed.. but my page is not getting navigated to pg2.php.


I am not sure if I am passing the parametrs through URL properly. Could anyone please help me with this?

Thanks.

Recommended Answers

All 3 Replies

Member Avatar for diafol

1) show the source code if different from above
2) show 'source view' for the html from browser
3) show url in address bar after link click

if above still doesnt work... try this.

<?php
echo "<a href='pg2.php?row1=".$row1[0]."'>CLICK ME!</a>"; 
?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.