Jump to content


Photo

change input spaces to underscores


  • Please log in to reply
2 replies to this topic

#1 trillion

trillion
  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 16 September 2006 - 08:46 PM

How can I change spaces in a $_POST into underscores?

I need the input to have spaces for general use but also want to use this same input to create a MySQL table with a prefix reflecting the $_POST so it is a unique occurence.

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 16 September 2006 - 08:50 PM

Like this??

$this = str_replace(" ","_",$_POST['whatever_its_name_is']);

Legend has it that reading the manual never killed anyone.
My site

#3 trillion

trillion
  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 16 September 2006 - 09:06 PM

that's it

Thank you




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users