Hi all,
Can anyone tell me the coding of the submit button submitting the two field name and phone no.
submit Button coding
Moderator: General Moderators
Re: submit Button coding
What you want, say clearly...according to your question,i think
On the page target.php
Code: Select all
<form method="post" name="data" action="target.php"><input type="text" name="name" value="Name"/><input type="number" name="phone" value="Phone Number"/><input type="submit" value="Submit"/></form>Code: Select all
<?php if(isset($_POST['name']))
$name=$_POST['name'];
if(isset($_POST['phone']))
$number=$_POST['phone'];
echo $name.' '.$number;?>-
johngill2810
- Forum Newbie
- Posts: 6
- Joined: Tue May 14, 2013 9:52 am
Re: submit Button coding
Hello,
Your code is here
<form method="post" name="form" action="#.php">
Name:<input type="text" name="nm" value="nm"/>
Phone No:<input type="text" name="pn" value="pn"/>
<input type="submit" value="SUBMIT"/>
</form>
Your code is here
<form method="post" name="form" action="#.php">
Name:<input type="text" name="nm" value="nm"/>
Phone No:<input type="text" name="pn" value="pn"/>
<input type="submit" value="SUBMIT"/>
</form>
-
akhilesh1010
- Forum Newbie
- Posts: 15
- Joined: Thu Aug 22, 2013 1:56 am
Re: submit Button coding
Nice example works fine if i want to store this information in database which is the best mysql or mysqli?pHp_n0ob wrote:What you want, say clearly...according to your question,i thinkOn the page target.phpCode: Select all
<form method="post" name="data" action="target.php"><input type="text" name="name" value="Name"/><input type="number" name="phone" value="Phone Number"/><input type="submit" value="Submit"/></form>Code: Select all
<?php if(isset($_POST['name'])) $name=$_POST['name']; if(isset($_POST['phone'])) $number=$_POST['phone']; echo $name.' '.$number;?>
Re: submit Button coding
The mysql extension is dead. Use mysqli (or PDO).akhilesh1010 wrote:Nice example works fine if i want to store this information in database which is the best mysql or mysqli?