Want to pass a string through URL...

Reply

Join Date: Feb 2008
Posts: 89
Reputation: jino is an unknown quantity at this point 
Solved Threads: 6
jino's Avatar
jino jino is offline Offline
Junior Poster in Training

Want to pass a string through URL...

 
0
  #1
Mar 12th, 2008
I want to pass this string $string="reg_personal.personal_sex='Female' OR reg_personal.marital_status='Single'"; through the URL...

Is it possible...I am not getting that... if the single quote is eliminated then there is no probs..
but i need that string in the exact way.... Is there any splitting and joining methods are available.

Please help me....

Thanks in adance,,
jino..
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 70
Reputation: forzadraco is an unknown quantity at this point 
Solved Threads: 1
forzadraco forzadraco is offline Offline
Junior Poster in Training

Re: Want to pass a string through URL...

 
0
  #2
Mar 12th, 2008
what for u want pass string with url...
its not secure
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 100
Reputation: petr.pavel is an unknown quantity at this point 
Solved Threads: 14
petr.pavel's Avatar
petr.pavel petr.pavel is offline Offline
Junior Poster

Re: Want to pass a string through URL...

 
1
  #3
Mar 12th, 2008
I agree with forzadraco: don't do this.
An attacker could simply call your page with:
page.php?string=;DELETE * FROM yourtable
and you're dead.

However, to answer your question, the function you're looking for is urlencode().
Petr 'PePa' Pavel

The more information you give the more relevant answer you get.
Please consider using "Add to ... Reputation" and mark your thread as Solved if you found what you were looking for. By giving feedback you help others.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 70
Reputation: forzadraco is an unknown quantity at this point 
Solved Threads: 1
forzadraco forzadraco is offline Offline
Junior Poster in Training

Re: Want to pass a string through URL...

 
0
  #4
Mar 12th, 2008
yeah forza petr.pavel
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 89
Reputation: jino is an unknown quantity at this point 
Solved Threads: 6
jino's Avatar
jino jino is offline Offline
Junior Poster in Training

Re: Want to pass a string through URL...

 
0
  #5
Mar 14th, 2008
Thank u very much both of u...
We only have to do a very few things right in our life, so long as we don't do too many things wrong.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC