Hello, I am trying to fwrite a new page with php code in it. The content variable is called $verbage. However, on the new page the $table comes through as blank. How can I code this so it shows the code on the new page?? $verbage=" <?php require(\"connectdb.inc.php\"); $table=\"webpagetable\"; ?>" Regards, Matt
I found that this works <?PHP $verbage=" <?php require(\"connectdb.inc.php\"); \$table=\"webpagetable\"; ?>"; echo $verbage; ?> Code (markup): The difference is I escape the $ so that it doesn't try to show the value of $table and just takes $table as a string. Sarah
I have another question. I have an html form posting to a php page. The value is pulled using the post method. How do I put a posted value into the content that's posted into the new page? ......$webinfo7=$_POST['Email'];....... $content=" <?php require(\"connectdb.inc.php\"); \$table=\"webpagetable\"; \$sql = \"SELECT * FROM webpagetable WHERE Email = $webinfo7 \"; \$result = mysql_query(\$sql,\$connection) or die(\"Couldn't execute query.\");...... I cannot figure out how to bring the $webinfo7 variable into the new php page. Any help? Thanks, Matt
So you want to bring the $webinfo7 to another page.. Honestly Im not great in PHP, but how about creating a session..... session_start(); // initialize session $_SESSION['webinfo7'] = $webinfo7; // pass the value of webinfo7 to sessionname: webinfo7 <-------- on the newpage.php -----> echo $_SESSION['webinfo7']; // I guess this will works.. Cheers!