Jump to content

str_replace with form help


MDanz

Recommended Posts

With this form... if i typed in "new test" in the search text field the url would come up as

 

test.php?search=new+test

 

How do i get the url to replace spaces as a dash instead of a plus sign?

 

<form action="test.php" method="GET" name="searchbar">

		<?php 


	$search = strtolower($_GET['search']);

	$formpage = $_SERVER['PHP_SELF'];

echo "<input type='text' size='40' name='search' style='font-size:16px; font-family:Arial;font-weight:bold;' />  <input type='submit'  value='Search' style='font-size:14px;' />";

		?>

			</div>

	</form>

Link to comment
https://forums.phpfreaks.com/topic/238676-str_replace-with-form-help/
Share on other sites

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.