hi guys how r u doing ..
i need some help .. something went wrong and i dunno what is going on ..
i will post the problems .. i hope someone could help
first i tried making a script .. to include certain files depending on the time ...
<?php
if((H >= 06 && H < 08) || (H >= 18 && H < 20))include 'includes/iboerderij.php';
elseif((H >= 08 && H < 10) || (H >= 20 && H < 22))include 'includes/inatuurlijk.php';
elseif((H >= 10 && H < 12) || (H >= 22 && H < 00))include 'includes/ivijvers.php';
elseif((H >= 12 && H < 14) || (H >= 00 && H < 02))include 'includes/iformeel.php';
elseif((H >= 14 && H < 16) || (H >= 02 && H < 04))include 'includes/imodern.php';
elseif((H >= 16 && H < 18) || (H >= 04 && H < 06))include 'includes/ioosters.php';
?>
it seemed to be working first .. but now it ONLY display inatuurlijk.php
any ideas why? i tried echoing the time .. and i can see the time is just like
my local time .. which means there is something wrong with my script.
second problem .. is that i tried running some validation for a form with php.
i didnt write the whole script. i got idea's here and there.
it was working in the morning and now it keeps echoing the e-mail
address that i entered is wrong. it keeps saying that. although in the morning
it only did if the e-mail address was missing a @ for example ..
<?PHP
if ($_SERVER['REQUEST_METHOD'] == "POST")
{
echo "<div id=\"contactinf\">";
if ((!$_POST['Name'] || !$_POST['Message'] || !$_POST['Email']))
{
echo 'u didnt fill everything in';
}
elseif (!preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST['Email']))
{
echo "wrong e-mail address";
}
else
{
echo 'something';
}
echo "<div id=\"contact-area\"> ";
}else
{
?>
<div id="contactinf">
<p>
something
</p>
<div id="contact-area">
<form method="post"><label for="Name" id="Name">Naam:</label>
<input type="text" name="Name" value="<?$_POST['Name']?>" />
<label for="Email" id="Email">E-mail:</label>
<input type="text" name="Email" value="<?$_POST['Email']?>"/>
<label for="Message" id="Message">Bericht:</label><br />
<textarea value="<?$_POST['Message']?>" name="Message" rows="20" cols="20"></textarea>
<input type="submit" name="submit" value="Verzenden" class="submit-button" />
</form>
<?
}
?>
i hope someone can help.
thanks in advance