Jump to content

[SOLVED] sending Parameters


adam84

Recommended Posts

I was wondering if it will cause a problem if the user enters some text like:

'I got 100% on my test & 85% on my assignment. What did you get?'

 

would the %, ? and & signs cause a problem with the data being sent? Is that a function that I should use to get around this...?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/64783-solved-sending-parameters/
Share on other sites

Still no like. This is what is going in:

 

Used PHP to write JS

echo "Function validate(){"
   //i took out all the validation tests and stuff
  echo "sendRequest( encodeURI('insertTitle.php?title='+title), 'result' );";
echo "}"

 

I enter the text '100% Me? & You' and submit it

the url being passed is: insertTitle.php?title=100%25%20Me?%20&20You

 

my php file to process the data

<?
$title = $_GET['title'];
echo urldecode($title);
?>

result of this is: 100% Me?

 

 

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.