Immediate help appreciated

Hello all; I would like some help with a php code I’m trying to customize. The code needs to post appended data using the _post method into a specific area of the page it posts to. The code I have does all but the last portion; posting into a specific area, such as a div or table. Also, if possible, I’d like each form of data to be made as a table row. I have the knowledge in theory, but just not the application. Immediate help is appreciated, and, thanks in advance.

[php]<?php
$myFile = “…/registration/february.php”;
$fh = fopen($myFile, ‘a’) or die(“can’t open file”);
$stringData = $_POST[“pt”]." “.$_POST[“jc”].” “.$_POST[“ci”].” “.$_POST[“r”].” ".$_POST[“dp”];
fwrite($fh, $stringData);
$lineBreak = “\n”;
fwrite($fh, $lineBreak);
fclose($fh);
?>[/php]

All pieces of data in the stringData should be in separate table rows (tr), which are all placed in the same table or div (id).

Well, are you asking to create a PHP file from your data and create a table inside it?
Or, are you asking to have the posted.php file create a table? Not exactly sure what you are asking…

But, maybe this will help. Let’s assume you want to display the posted data in a table.
Here is your code changed to display the posted data in a table with each on a different row…
[php]

<?php echo "/n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
Here is variable pt: " . $_POST['pt'] . "
Here is variable jc: " . $_POST['jc'] . "Here is variable ci: " . $_POST['ci'] . "Here is variable r: " . $_POST['r'] . "Here is variable dp: " . $_POST['dp'] . "
"; ?>

[/php]
This is just a small sample. You can create a new string with the above data using something like $table="

here is variable pt: " . $_POST[‘pt’] . rest of data… And then print it instead of sending it back to the browser to display. Not being sure what you are asking, I hope this helps… Good luck…
Sponsor our Newsletter | Privacy Policy | Terms of Service