Page 1 of 1

from & not showing?

Posted: Tue Nov 24, 2009 5:06 am
by remshad
i am making a page for saving url addres (list)
for that i crated a php code

Code: Select all

<html>
<body>
<form action='test1.php' method='get'>
Name: <input class='button' type='name' name='text' />
<input type='submit' />
</form>
<?php
echo $_GET['text'];
if(get_magic_quotes_gpc())
{
    echo stripslashes($_GET['text']);
    $url=stripslashes($_GET['text']);
}   
else
{   echo $_GET['text'];
     $url=($_GET['text']);
}
 
echo $url;
$file = fopen("link1.txt","r");
$abc=fread($file,filesize("link1.txt"));
fclose($file);
$file = fopen("link1.txt","w+");
$txt=$url.$abc;
echo fwrite($file,$txt);
fclose($file);
?>

problem is that when i try to enter dynamic urls like http://www.college-seminars.com/search. ... order=desc


it shows only upto "http://www.college-seminars.com/search. ... on=results" from & its trimming.,

please help me to avoid this problem

Re: from & not showing?

Posted: Tue Nov 24, 2009 5:28 am
by jackpf
Because you're using GET. You need to put the query string values as hidden inputs.