Search code examples
phpmysqlget

%27 value in transferring data to another php page


http://127.0.0.1:8888/degis2.php?isim=%27oteller%27&Id=%271%27&oname=%27asasdasfda123445%27

any idea why there is %27 in every variable?

MY code is

<form id="form1" name="form1" method="post" action="degis2.php?isim='<?php echo $isim;?>'&Id='<?php echo $id;?>'&oname='<?php echo $name;?>'">

Php codes are working as you can see it fills them in the link but probably because of the "%27" it can not find the values in database and return me query failed.

$isim=$_GET["isim"];
$id=$_GET["Id"];
$tname=$_GET["oname"];
$name=$_POST["name1"];
$aciklama=$_POST["aciklama1"];
$link=$_POST["link1"];

and these are the variables i need. Can anybody help me to clean the %27 value from the link? Have a nice day


Solution

  • Should be (without ' after =):

    <form id="form1" name="form1" method="post" action="degis2.php?isim=<?php echo $isim;?>&Id=<?php echo $id;?>&oname=<?php echo $name;?>">