Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Hi,
I'm currently trying to create checkboxs from a file. I'm doing the below:Code: Select all
<?
$filename = "dummy.txt";
$handle = fopen($filename, "r")or die("Somthin is wrong");
$contents = fread($handle, filesize($filename));
echo "<form name=\"form1\" action=\"$self\" method=\"POST\">
<input type=\"checkbox\" name=\"option1\" value=\"$contents\">$contents<br><br>
<input type=\"submit\" value=\"Submit\">
</form>";
fclose($handle);
?>test1
test2
test3
when i view the page threw the browser i get:
checkbox [] test1 test2 test3
what i'm after is:
checkbox[] test1 checkbox[] test2 checkbox[] test3
any help on this please?
Thanks in advance,
slash.
feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]