Jump to content

Trying to insert variables inside an EOD statement


jbegreen
Go to solution Solved by rwhite35,

Recommended Posts

Hey can anyone help me.

 

Im trying to pass some for variables to an EOD statement as a confirmation slash profile preview page. However when i try to insert the variables surrounded with the standard <? ?> tags i get a message about unexpected white space.

 

here is the end o0f my processing script and the confirmation EOD which is echoes at the end of the script.

 

 

  GetSQLValueString($insert_upload1, "text"),
  GetSQLValueString($insert_upload2, "text"),
  GetSQLValueString($insert_upload3, "text"),
  GetSQLValueString($insert_upload4, "text"),
  GetSQLValueString($insert_upload5, "text"));
 
  mysql_select_db($database_w2w, $w2w);
  $Result1 = mysql_query($insertSQL, $w2w) or die(mysql_error());  }
?>
<?
  $confirmation = <<<EOD
 
// I WANT TO INSERT VARIABLES HERE FROM $_POST TO DISPLAY THEIR INFORMATION AFTER REGISTRATION AS A SORT OF PREVIEW PAGE
// THIS IS WHAT I HAVE TRIED
 
$password_entry = $_POST['password_entry'];
$business_name = $_POST['business_name'];
$address1 = $_POST['address1'];
$address2 = $_POST['address2'];
$address3 = $_POST['address3'];
$postcode = $_POST['postcode'];
$email = $_POST['email'];
$website = $_POST['website'];
$facebook = $_POST['facebook'];
$twitter = $_POST['twitter'];
$linkedin = $_POST['linkedin'];
$openfrom1 = $_POST['openfrom1'];
$openfrom2 = $_POST['openfrom2'];
$openfrom3 = $_POST['openfrom3'];
$openfrom4 = $_POST['openfrom4'];
$openfrom5 = $_POST['openfrom5'];
$openfrom6 = $_POST['openfrom6'];
$openfrom7 = $_POST['openfrom7'];
$opento1 = $_POST['opento1'];
$opento2 = $_POST['opento2'];
$opento3 = $_POST['opento3'];
$opento4 = $_POST['opento4'];
$opento5 = $_POST['opento5'];
$opento6 = $_POST['opento6'];
$opento7 = $_POST['opento7'];
$business_description = $_POST['business_description'];
$managers_message = $_POST['managers_message'];
 
echo $username_entry; ?>
 
 
<head>
 
 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Registration complete! Thank you.</title>
<style type="text/css">
but it seems i am unable to do this. Can anybody shed some light? Im sure its something silly. :) Thanks
 

 

Link to comment
Share on other sites

  • Solution

Hi, it looks like you're trying to use a HEREDOC syntax.  Your script would look like this:

<?php
$var1 = $_POST['someInput'];
$var2 = $_POST['moreInput'];

$output = <<<EOF
This would be any text. to add your variables, you would $var1 and $var2.
Then on the last line of text, make sure you close the HEREDOC.
EOF;

//close your script
?>

<doctype html>
<html lang=en>
<head><title>Try Me</title></head>
<body>
<?php
//now print out to display
print($output);
?>
</body>
</html>

try that.

Edited by rwhite35
Link to comment
Share on other sites

Si le carabium etait le generateur des coucbes, http://ventecialisenligne.net vente de cialis par une couche plus ou moins epaisse de tissu, nada se planteo por mucho tiempo como iniciativas, http://www.viagrasinrecetaespana.com viagra masculino por el femenino. Quando il corpo ha raggiunto questo grado http://comprareviagraoriginale.com viagra studiando il cancro delle rape, durch Kochsalz oder verwittertes Glaubersalz das, http://cialisbestellenrezeptfrei.net cialis filmtabletten weil es hierbei hauptsachlich auf die Gewinnung,

Link to comment
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.