Reply to can't find the parser error

Your name:

Reply:


Posted by "zedleon" on 08/04/05 08:31

I am having trouble finding the parser error in this small test script. Any
help would be appreciated
I am pulling in an array from this html form.

<form action="/testarray.php" method="post">
<p>Event Name: <input type="text" name="name" size="30" /></p>
<p>Week Days</p>
<input type="checkbox" name="weekdays[]" value="Sunday" />S
<input type="checkbox" name="weekdays[]" value="Monday" />M
<input type="checkbox" name="weekdays[]" value="Tuesday" />T
<input type="checkbox" name="weekdays[]" value="Wednesday" />W
<input type="checkbox" name="weekdays[]" value="Thursday" />T
<input type="checkbox" name="weekdays[]" value="Friday" />F
<input type="checkbox" name="weekdays[]" value="Saturday" />S
</P>
<input type="submit" name="submit" value="Add the Event!" /></form>


testarray.php


<?php

print "<p>You want to add an event called
<b>{$_POST['name']}</b> which takes place on: <br />";


if (is_array ($_POST['weekdays'])) {

foreach ($_POST['weekdays'] as $day) {
print "$day"

}

} else {

print 'Please select at least one weekday for this event!';

}

print '</p>';

?>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация