I need to make 2 submit buttons one that if clicked sends data to a mysql server the other if clicked takes data from the mysql server.
This is what my submit buttons are currently.
Code:
<input type="submit" name="submit" id="submit" value="Create an Account" />
<input type="submit" name="submit" id="submit" value="Tell Me My Password" />
I am using an if statement in perl to try and get it to do one of the other action for it like this.
Code:
if ($submit == "Create an Account")
{
Send everything to the database
}
Code:
if ($submit == "Tell Me My Password")
{
Send password back
}
Right now it will run through both of them sending the data to the mysql database as well as sending it back and printing it, and I don't know how to make it so that it will only run through the one clicked on. Can anyone help me?
|