Page 1 of 1

Weird GET Query String

Posted: Tue Jan 03, 2006 10:57 pm
by bubberz
Sami | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]


my querystring looks like this:
http://localhost:8080/AdminEditByEmail. ... nformation

I only need the Email query string parameter, but the button name and value are getting concatenated to the end.
I validate the form since the user has to enter some or all of the email address.

Why is this happening?

Here's some of the HTML that should help:

Code: Select all

<form id="frmViewInfo" name="frmViewInfo" method="get" action="AdminEditByEmail.php">
  <table width="80%" border="1">
    <tr  >
      <td width="100%">Email:<font color="red">*</font></td>
      <td width="100%"><input name="Email" type="text" id="Email" size="100" maxlength="100" /></td>
    </tr>
  </table>
  <p align="center">
		<input name="btnSubmitInfo2" type="submit" id="btnSubmitInfo2" value="Click To View User Information" />

 </p>

Sami | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

Posted: Tue Jan 03, 2006 10:59 pm
by m3mn0n
Moved to PHP Code.

Posted: Tue Jan 03, 2006 11:01 pm
by John Cartwright
I don't get it, that is normal behavior for the submit button to be included along the query string.

If you only want one part of the query string then do

Code: Select all

echo $_GET['Email'];
You could also use a link/image and javascript to submit the form, so no other information is passed along

Code: Select all

<a href="#" onClick="document.formname.submit();">Submit Me</a>

Posted: Tue Jan 03, 2006 11:06 pm
by bubberz
Jcart!

Thanks for the reply. I thought my page that looks for the Email query string should be fine...and it was...I had two server behaviors "Show if recordset not empty" and another "Hide if empty", and the table I wanted to use to display the "contains" Email query string data was in the "Hide" portion of the page!

Thanks...sorry for the confusion!

Posted: Wed Jan 04, 2006 7:33 am
by Buddha443556
... or just not give the button a NAME.