multiple choice submit, 1 form.

Codes here !

Moderators: macek, egami, gesf

User avatar
webwired
New php-forum User
New php-forum User
Posts: 26
Joined: Sat Nov 23, 2002 5:20 pm
Location: St. Louis, Missouri
Contact:

multiple choice submit, 1 form.

Postby webwired » Sun Dec 01, 2002 6:07 pm

I am creating my database, and when my page prints the results of my query, I would like to have a multiple choice submission at the end of each result, edit or delete. I have tried every combination of scripting I can find on the internet or think of, and nothing seems to work. Any ideas? Because apparently PHP doesn't play nice with javascript.

User avatar
webwired
New php-forum User
New php-forum User
Posts: 26
Joined: Sat Nov 23, 2002 5:20 pm
Location: St. Louis, Missouri
Contact:

Postby webwired » Wed Dec 04, 2002 10:13 pm

Here's the code in case anybody else has this prob.

Code: Select all

 <SCRIPT>
 function submitFunction(i) {
    if (i==1) document.theForm.action=
       "editdomain.php";
    if (i==2) document.theForm.action=
       "deletedomain.php";
    document.theForm.submit()
    }
 </SCRIPT>

<form name=theForm>
 <INPUT TYPE=button VALUE=Edit 1 onClick=submitFunction(1)>
 <INPUT TYPE=button VALUE=Delete 2 onClick=submitFunction(2)>
</form>


Return to “mySQL & php coding”

Who is online

Users browsing this forum: Google [Bot] and 1 guest