How to give link in PHP

see <a… after show checkout button …thats my problem

<?php
} // show checkout button

echo ‘<a href="index.php?main_page=tell_a_friend&url=’.$url.‘">’.“vishal”.‘</a>’;

?>

Question:

Nothing opens or redirect when i click on “vishal”

its link and in IE its not opening.

$url is array to string: a long string…

when i make right click and select open in new window then everythinh work…

can i get solution of this

my website link:
http://netclues.net/demo1/caytech/index.php
you need to select one produect and then just add to cart…
so on shopping cart page you can find link:

vr4indian@yahoo.com

That’s one hell of a link:

<a href="index.php?main_page=tell_a_friend&url=MA%253D%253D%7CXl5hcnJheV5ZWFIwY21saWRYUmxTR2xrWkdWdVJtbGxiR1ElMjUzRCU3Q1hsNWUlN0MlN0NabXhoWjFOMGIyTnJRMmhsWTJzJTI1M0QlN0NYbDVlJTdDJTdDWm14aFoxTm9iM2RHYVhobFpGRjFZVzUwYVhSNSU3Q1hsNWUlN0MlN0NiR2x1YTFCeWIyUjFZM1J6U1cxaFoyVSUyNTNEJTdDYUhSMGNEb3ZMMjVsZEdOc2RXVnpMbTVsZEM5a1pXMXZNUzlqWVhsMFpXTm9MMmx1WkdWNExuQm9jRDl0WVdsdVgzQmhaMlU5Y0hKdlpIVmpkRjlwYm1adkptRnRjRHR3Y205a2RXTjBjMTlwWkQweiU3QyU3Q2JHbHVhMUJ5YjJSMVkzUnpUbUZ0WlElMjUzRCUyNTNEJTdDYUhSMGNEb3ZMMjVsZEdOc2RXVnpMbTVsZEM5a1pXMXZNUzlqWVhsMFpXTm9MMmx1WkdWNExuQm9jRDl0WVdsdVgzQmhaMlU5Y0hKdlpIVmpkRjlwYm1adkptRnRjRHR3Y205a2RXTjBjMTlwWkQweiU3QyU3Q2NISnZaSFZqZEhOSmJXRm5aUSUyNTNEJTI1M0QlN0NQR2x0WnlCemNtTTlJbWx0WVdkbGN5OHlNWFIyTG1wd1p5SWdZV3gwUFNJeU1XbHVZMmdpSUhScGRHeGxQU0lnTWpGcGJtTm9JQ0lnZDJsa2RHZzlJalExSWlCb1pXbG5hSFE5SWp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KeVpXTjBhVzVuSUhSb1pTQnhkV0Z1ZEdsMGVTQmhibVFnWTJ4cFkydHBibWNnZEdocGN5QmlkWFIwYjI0dUlDSWdMejQ4YVc1d2RYUWdkSGx3WlQwaWFHbGtaR1Z1SWlCdVlXMWxQU0p3Y205a2RXTjBjMTlwWkZ0ZElpQjJZV3gxWlQwaU15SWdMejQlMjUzRCU3QyU3Q2NISnZaSFZqZEhOUWNtbGpaUSUyNTNEJTI1M0QlN0NKRFEwTGpBdyU3QyU3Q2NISnZaSFZqZEhOUWNtbGpaVVZoWTJnJTI1M0QlN0NKRFEwTGpBdyU3QyU3Q2NtOTNRMnhoYzNNJTI1M0QlN0NjbTkzUlhabGJnJTI1M0QlMjUzRCU3QyU3Q1luVjBkRzl1UkdWc1pYUmwlN0NNUSUyNTNEJTI1M0QlN0MlN0NZMmhsWTJ0Q2IzaEVaV3hsZEdVJTI1M0QlN0NNUSUyNTNEJTI1M0QlN0MlN0NhV1ElMjUzRCU3Q013JTI1M0QlMjUzRCU3QyU3Q1lYUjBjbWxpZFhSbGN3JTI1M0QlMjUzRCU3Q1hsNWU%253D">vishal</a>

This may or may not be related, but Internet Explorer is producing an Error on the following line complaining of an unterminated string constant here:

<img src="images/Find1.gif" height=21
onclick="Javascript:window.open('http://netclues.net/demo1/caytech/index.php?main_page=tell_a_friend?txtManagerName='+document.getElementById('url').value,
'wroxwindow', 'height=200, width=300, top=250, left=350, resizable=yes,
scrollable=yes, toolbar=no');">

Which looks like a carriage return issue after ‘resiazable=yes’

PS. Don’t you have error reporting turned on in IE??

The link is around 2468 characters long.
Internet Explorer has a maximum path length of 2,048 characters. You shouldn’t need to use such a long convoluted url anyway :wink:

so can you tell me how can i pass this long value to other pages.

as this url (converted array) contain whole information regarding products…

can you help me how should i write the code…like how to pass the $url it?

any javascript or anything …

i am using zencart.

thanks for ur reply

so can you tell me how can i pass this long value to other pages.
as this url (converted array) contain whole information regarding products.

I wouldn’t pass a long value and you shouldn’t need to. Every product must have a unique identifier, usually it’s id/product id. That’s all you should need to pass around. I don’t know of zencart but I find it hard to believe that a script needs to pass around an entire database row of information to identify products.

I’m not sure how you go about fixing this if it’s not your own code but I’d start by asking the creators of zencart if the code is too confusing.

I don’t know about zencart, but…

When I need to pass information and I don’t want to use the GET method by using a query string ( adding it to the URL)…
I add a <input type=‘hidden’ name=‘url’><?php echo $url; ?></input>
And send it in a form using the POST method.

i am using two form but one after another;

this is my code and i do as you say but probem remains same;

this is my code file :

echo ‘<a href="index.php?main_page=tell_a_friend&url=’.$url.‘">’.“vishal”.‘</a>’;
?>
<a href=“index.php?main_page=tell_a_friend&url=<?php echo $url;?>”><font color=“#FF0000” size=“+3”>Tell Admin</font></a>
<!–eof shopping cart buttons–>
</form>

<form action=“http://netclues.net/demo1/caytech/index.php?main_page=tell_a_friend” method=“get” name=“scart”>

<table width=“300” border=“1” cellspacing=“0” cellpadding=“5”>

<tr>
<td width=“300”>
<textarea name=“url” cols=“15” rows=“100”><?php echo $url;?></textarea>
</td>
</tr>

<tr>
<td>
<input type=“hidden” name=“hurl” value=“<?php echo $url; ?>” /></input>
</td>
</tr>

<tr>
<td width=“300”>
<input type=“submit” name=“submit” value=“submit” />
</td>
</tr>

</table>

</form>

in <textarea> it show perfact value of $url… but when i press “submit” nothing happens?

plese

vr4indian@yahoo.com

You won’t be able to send it using GET either as this also has a limit. Try POST or fix the amount of data that you are sending… as suggested above the simple fix is to send ONLY the product ID.

ok

i got it.

my second form with change code:

<form id=“id2” action=“http://netclues.net/demo1/caytech/index.php?main_page=tell_a_friend” method=“post” name=“scart”>

changes;
1: i put id tag
2: and change the method

now it works

gr8

thanks to you all for ur help.

hope this can be usefull for others too.