logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 09-08-2008, 05:19 PM   #1
student101
 
Join Date: Dec 2007
Posts: 379
Question image as button adds values to url?

Using an image as a button adds more values to the url?
Code:
 
<form action="search.php" method="get" id="searchform">
<div>
<table class="search">
<tr>
<td><input type="text" value="<?php echo $_GET['q']; ?>" name="q" class="q"/></td>
<td><input type="image" src="img/button.jpg" /></td>
</tr>
</table>
</div>
</form>
Code:
search.php?q=Engineering&x=10&y=7
Almost like it's co-ordinates of sorts?

Anyone know what's going on?

Cheers
__________________
Amateurs ... Built the ark.
Professionals ... Built the Titanic.
specificity [sound like spe-sifis-ity]
student101 is offline   Reply With Quote
Old 09-09-2008, 01:32 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

putting
<?php echo $_GET['q']; ?>
on search.php what do you get?
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 09-09-2008, 06:03 AM   #3
student101
 
Join Date: Dec 2007
Posts: 379
Default

I get the exact value that I typed in.
Not sure what you mean?(t)?
__________________
Amateurs ... Built the ark.
Professionals ... Built the Titanic.
specificity [sound like spe-sifis-ity]
student101 is offline   Reply With Quote
Old 09-09-2008, 07:05 AM   #4
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

i always use Post but i just tried with get and received
Apply.php?apply=1111&select=Submit+Query where the value is 1111. normally I use Get is to 'capture, a value sent by URL, Im guessing you are catching all the form elements. BTW it still works using the 1111 to select from my database. Curious
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 09-09-2008, 11:15 AM   #5
student101
 
Join Date: Dec 2007
Posts: 379
Default

Yes, I am also curious as to why this happens?
It's very freakin' ODD!
If I use a standard Submit button - this doesn't happen, these co-ordinates of sorts.

If I find it, i'll post it.

Cheers
__________________
Amateurs ... Built the ark.
Professionals ... Built the Titanic.
specificity [sound like spe-sifis-ity]
student101 is offline   Reply With Quote
Old 09-09-2008, 12:13 PM   #6
student101
 
Join Date: Dec 2007
Posts: 379
Default

It's the purpose of the image;
further reading...
http://www.w3.org/TR/html401/interac...#submit-button
Quote:
Originally Posted by edbr View Post
i always use Post but i just tried with get and received
Apply.php?apply=1111&select=Submit+Query where the value is 1111. normally I use Get is to 'capture, a value sent by URL, Im guessing you are catching all the form elements. BTW it still works using the 1111 to select from my database. Curious
__________________
Amateurs ... Built the ark.
Professionals ... Built the Titanic.
specificity [sound like spe-sifis-ity]
student101 is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:07 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com