This is a simple script to pass values from our server side language PHP to the client side script JAVASCRIPT.
Its pretty simple we have two php files.
CONTACT.php and SEND.php
in that you can see like values which we enter in contact.php will be send to the text fields of send.php
<tr>
<td><strong>Contact Form </strong></td>
</tr>
</table>
<table width=”400″ border=”0″ align=”center” cellpadding=”0″ cellspacing=”1″>
<tr>
<td><form name=”form1″ method=”post” action=”send.php”>
<table width=”100%” border=”0″ cellspacing=”1″ cellpadding=”3″>
<tr>
<td width=”16%”>Subject</td>
<td width=”2%”>:</td>
<td width=”82%”><input name=”subject” type=”text” id=”subject” size=”50″></td>
</tr>
<tr>
<td>Detail</td>
<td>:</td>
<td><textarea name=”detail” cols=”50″ rows=”4″ id=”detail”></textarea></td>
</tr>
<tr>
<td>Name</td>
<td>:</td>
<td><input name=”name” type=”text” id=”name” size=”50″></td>
</tr>
<tr>
<td>Email</td>
<td>:</td>
<td><input name=”customer_mail” type=”text” id=”customer_mail” size=”50″></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type=”submit” name=”Submit” value=”Submit”> <input type=”reset” name=”Submit2″ value=”Reset”></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
// Mail of sender
//code by mistonline.in
$subject=$_POST['subject'];
$detail=$_POST['detail'];
$name=$_POST['name'];
echo “<input id=’mail’ type=” name=’recipient’ value=’”.$mail_from.”‘>”;
echo “<input id=’detail’ type=” name=’recipient2′ value=’”.$detail.”‘>”;
echo “<input id=’name’ type=” name=’recipient3′ value=’”.$name.”‘>”;
echo “<input id=’sub1′ type=” name=’recipient4′ value=’”.$subject.”‘>”;
?>
<script language=”javascript” type=”text/javascript”>
mail1 = document.getElementById(‘mail’).value
name = document.getElementById(‘name’).value
//subject = document.getElementById(‘sub1′).value
//detail = document.getElementById(‘detail’).value
alert(“The Mail You Entered Is” +mail1)
alert(“The name You Entered Is” +name)
//alert(“The Sub You Entered Is”+ sub1)
//alert(“The detail You Entered Is”+ detail)
//code by Mistonline.in
Incoming search terms:
- pass php value to javascript (5)
- how to pass the value of a button in php (2)
- inurl:”send php” (2)
- send a table from php to javascript (2)
- javascript pass value to php (2)
- how to pass php value to javascript (2)
- inrul:/forms/formfields (2)
- how to give value coming form ajax to textbox in yii (2)
- yii dropdownlist in search results (2)
- AJAXUniqueTextBox (2)
- passing value from table javascript and php code (1)
- pass value from javascript document getElementById() to php (1)
- php pass value to html (1)
- php pass table to javascript (1)
- php pass mysql id to javascript (1)
- pass value of a textbox to another yii (1)
- pass value of dropdown to model yii (1)
- php curl table alma (1)
- php code to pass display value (1)
- passing php values to javascript (1)
- php code how to pass value to javascript (1)
- php send two ids with javascript (1)
- php value to js client (1)
- yii three related dropdownlists (1)
- yii passing value dropdownlist (1)
- yii passa a dropdownlist (1)
- yii get value combobox (1)
- yii dropdownlist with string values (1)
- yii dropdownlist passing value (1)
- yii document expires back (1)
- value of one textbox from another textbox in yii (1)
- sharing a php value with javascript (1)
- sending php value to javascript (1)
- send php value to slideshow jquery (1)
- send php value to javascript jquery (1)
- send php value js (1)
- select multi value pass into text field (1)
- pass javascript value to php (1)
- pass javascript form values to php (1)
- how to pass value from add to favourite in php (1)
You will also be interested in ,
- New horizontal drop down menu using css
- Learn CSS Basics Very Simple Tutorial
- How To Set And Get Cookies Using PHP
- Autosuggestion / Autocomplete script using PHP and Ajax
- Tag cloud using php, mysql and ajax with filter
- Close Event In Javascript Using OnUnload()
- CSS or Table?
- Close Event In Javascript For Firefox, IE and Chrome
- Change background color using php for a webpage
- Add to favorites or bookmarking using javascript in firefox and internet explore [IE]

