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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms

Status
Not open for further replies.

daybase

Technical User
Dec 13, 2002
115
GB
I want to use a graphic and not a button to submit a form can I and how?

I also want more than one submit buttons that submits form with different variables can thisbe done?
 
1.
Code:
<input type="image" src="submit.gif" />

2. Using javascript:
Code:
<form action="page.php?var=0" method="post">
 <input type="submit" value="Value 1" onclick="this.form.action='page.php?var=1';" />
 <input type="submit" value="Value 2" onclick="this.form.action='page.php?var=2';" />
 <input type="submit" value="Value 3" onclick="this.form.action='page.php?var=3';" />
</form>
Is that what you mean by submitting a form with different variables?

--Chessbot

There is a level of Hell reserved for probability theorists in which every monkey that types on a typewriter produces a Shakespearean sonnet.
 
Easy as that? - thanks a lot solves my problem nicely
 
No problem; see you in the JS forum :)

--Chessbot

There is a level of Hell reserved for probability theorists in which every monkey that types on a typewriter produces a Shakespearean sonnet.
 
My solution - pass a variable to another php script to manipulate text depending on the variable then calling the form again inserting the revised text as a value in the input field. Works great thanks again
 
Sounds slow...
Whatever floats your boat!
[tt]__ --- _______
___ | | ___
_______| |__[pirate]____
__\ /_____
\______________/
___ _______
______
____ ______[/tt]
That was fun... [lol]

--Chessbot

There is a level of Hell reserved for probability theorists in which every monkey that types on a typewriter produces a Shakespearean sonnet.
 
It is lol - going along the javascript path after all
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top