Jump to content

Issue with passing a variable that has a single quote


alfredviegas

Recommended Posts

Hi,

 

I am developing a family tree website and I am facing an issue with passing variables that have a single quote. My code is as follows

 

$childName="David D\'Souza";  // this value comes from the database

 

echo "<td align='center' cellpadding='9'>";

echo "<a href='family.php?parent_name=$root_father&childName=".$child_name."'>".$childName."</a></td>";

 

When i try to put my mouse cursor over this link to pass the variable to the next page, all i get is David D\ instead of getting the whole name: David D\'Souza

What do i need to do in order the entire variable sent to the next page.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.