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
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?

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.