Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php form with get not working

Status
Not open for further replies.

leegold

Technical User
Mar 19, 2002
39
US
When I try the code below and click submit the the browser stays at the form page. I see a problem: in the address bar of the browser it's:
it should be:


it's putting in the form page in there for some reason. This started when I transfered these file over to a new machine - but what's causing it? See the code blow - Thanks!!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"<html xmlns=" lang="en" xml:lang="en">

<html>
<head>

<title>MYSQL FullText Search Test</title>
<!--link rel="stylesheet" href="mysql1.css" type="text/css"-->
<link rel="stylesheet" href=" type="text/css">



</head>
<body>
<br>
<h2>PHP/MYSQL Test Search Form</h2><br>
<?php

echo
'<form action='search_test2.php' method="get">
<p><input type="text" name="key_word" /><p>
<input type="submit" /></p>
</form>
<pre>
<h4>Boolean Search Operators:</h4>
+ The word is mandatory in all rows returned.

- The word cannot appear in any row returned.

() Used to group words into subexpressions.

* The wildcard, indicating zero or more characters.
It can only appear at the end of a word.

" Anything enclosed in the double quotes is taken as a
whole (so you can match phrases, for example).
</pre>';
?>
</body>
</html>
 
Put double quotes around the form action:

Code:
echo
  '<form action="search_test2.php" method="get">
    <p><input type="text" name="key_word" /><p>
    <input type="submit" /></p>echo...

*cLFlaVA
----------------------------
A polar bear walks into a bar and says, "Can I have a ... beer?"
The bartender asks, "What's with the big pause?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top