Jump to content

Setting the value of a Form Input Field from $_REQUEST['fname'] Posting


TerryJ

Recommended Posts

I have a form in an HTML coded page Posting a name (Jim Smith) to address the required variables in an included php array:

 

<!-- Echo as test of correct posting -->

<?php

include 'vars.php';

define (_fname,$_REQUEST['fname']);

define (_lname,$_REQUEST['lname']);

echo _fname . " " . _lname;

?>

<div style="position:absolute;padding:30px;top:220px;width:900px"><h3>To the Secretary, Treasurer and Captain</h3>

<p><h3>Joining SREIGS</h3>I wish to become a member of SREIGS.</p>

<!-- Active only if action set to "joining.php" -->

<form action="" method="post" id="joining" target="reply">

<fieldset>

<legend><h3>New Member information</h3></legend>

<br>Please provide the following details for our records:<br><br>

First Name (only):<input type="text" name="fname" value= <?php _fname ?> >

Last Name:<input type="text" name="_lname" value=_lname ><br><br>

</fieldset>

</form>

<iframe name="reply" height="500" width="897" frameborder="0" scrolling="No">

<p>Your browser does not support iframes.</p>

</iframe>

You will note that in "fname" and "lname" fields I have tried different methods - neither works.
TerryJ

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...