Hi,
Forgive the subject i didn't really know how to explain it. I have a textfield where i paste csv data roughly 27 fields. When you hit submit it will display on the same page, each field in its own column.
What i need now is when its converted, i'd like to send someone the URL for the page and they can view the same data that was used, im guessing a tmp file to be created which can be included on the URL - not sure how this is done. Below is my current code, any help is appreciated.
Thanks,
dR
-----TEXTFIELD------
<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
<p><textarea name="feild1" cols="50" rows="5" id="feild1"></textarea>
<input type="submit" value="CONVERT!">
-----DISPLAY IN TABLE------
<table width="2370" border="0" cellpadding="3" cellspacing="0">
<?php if(isset($_POST['feild1'])){
$stripped = str_replace("\r", ",", $_POST['feild1']);
$BREAK = explode(",", $stripped);
//
echo "<TR>";
$count=count($BREAK);
for ($i = 0; $i < $count; $i++) {
//if the count is greater than 28, then start a new table row
if (($i)%32==0)
{
echo "</TR><TR>";
echo "<TD><FONT SIZE=2>".$BREAK[$i]."</FONT></TD>";
}
else {
if (($i+1)%32==0)
{
echo "<TD><FONT SIZE=2>".$BREAK[$i]."</FONT></TD>";
}
else {
echo "<TD><FONT SIZE=2>".$BREAK[$i]."</FONT></TD>";
};
};
};
}
?>
</tr>
</table>
</form>
Forgive the subject i didn't really know how to explain it. I have a textfield where i paste csv data roughly 27 fields. When you hit submit it will display on the same page, each field in its own column.
What i need now is when its converted, i'd like to send someone the URL for the page and they can view the same data that was used, im guessing a tmp file to be created which can be included on the URL - not sure how this is done. Below is my current code, any help is appreciated.
Thanks,
dR
-----TEXTFIELD------
<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
<p><textarea name="feild1" cols="50" rows="5" id="feild1"></textarea>
<input type="submit" value="CONVERT!">
-----DISPLAY IN TABLE------
<table width="2370" border="0" cellpadding="3" cellspacing="0">
<?php if(isset($_POST['feild1'])){
$stripped = str_replace("\r", ",", $_POST['feild1']);
$BREAK = explode(",", $stripped);
//
echo "<TR>";
$count=count($BREAK);
for ($i = 0; $i < $count; $i++) {
//if the count is greater than 28, then start a new table row
if (($i)%32==0)
{
echo "</TR><TR>";
echo "<TD><FONT SIZE=2>".$BREAK[$i]."</FONT></TD>";
}
else {
if (($i+1)%32==0)
{
echo "<TD><FONT SIZE=2>".$BREAK[$i]."</FONT></TD>";
}
else {
echo "<TD><FONT SIZE=2>".$BREAK[$i]."</FONT></TD>";
};
};
};
}
?>
</tr>
</table>
</form>