Jump to content

Recommended Posts

Below i have a form which i want to be filled with variables sent from the last page. can anyone tell me why the variables are not showing - I think its something to do with the syntax of the php inside the html form

 

<?
if ($_POST['method']=='worldpay') {
	echo '<form action="#" method="post" name="BuyForm"> 
		<input type="hidden" name="instId"  value="120597"> 
		<input type="hidden" name="cartId"  value="GTG">
		<input type="hidden" name="currency"  value="GBP"> 
		<input type="hidden" name="testMode"  value="100">
		<table border="0" cellpadding="0" cellspacing="3">
				<tr> 
					<td colspan="2"><h1><strong>Please confirm and click continue to payment</strong></h1></td>
				</tr>
			    <tr>
			      <td>Amount</td>
			      <td><input name="amount" type="text" size="30" value="$_POST['amount']"></td>
  					</tr>
			    <tr>
			      <td>Name</td>
			      <td><input name="MC_Name" type="text" size="30" value="$_POST['MC_Name']"></td>
  					</tr>
				 <tr> 
					<td>E Mail</td>
					<td><input name="MC_Email" type="text" size="30" value="$_POST['MC_Email']"></td>
				</tr>
				<tr>
					<td>Phone number </td>
					<td><input name="MC_Phone" type="text" size="30" value="$_POST['MC_Phone']"></td>
			  	</tr>
		</table>
		  <!-- This generates a button that submits the information and sends the user to the Worldpay payment pages. -->
		  <input type="submit" value="Buy Now" onclick="javascript:formCheck();">
		</form>';
} else {
	echo '<tr><td align="center"><p>Please send cheques payable to ...</p></td></tr>';
} 
?>

Link to comment
https://forums.phpfreaks.com/topic/72174-displaying-variables-in-html-form/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.