Jump to content

Newb errors


Louche

Recommended Posts

Euh... I read the guide. It said to post in a newb forum, but I looked for it, and it doesn't seem to exist. :'(

Here's my script:

[quote]<p>
Leo ni
<?php
setlocale(LC_TIME, "fr_FR");
echo strftime("%A, %d %B %Y").".";
?>

</p>



<form action="Jambo.php" method="post">
<p>Would you like to learn Swahili?</p>
<p><button type="submit" name="learn" value="yes" />Yes</button> &nbsp;&nbsp;<button type="submit"

name="learn" value="no" />No</button></p>
</form>
<?php

$learn = $_POST['learn'];
if ( $learn == yes )
{
print "Jambo!";
}
else
print "Pole! (too bad!)";
?>[/quote]

http://localhost/initiate/Jambo.php

The button script was working earlier, but then I added the date script, and neither one was working (the date stayed in English). I uploaded it to my website, and... err... when I clicked one button, the date would be in French, and when I clicked the other button, the date would be in English. I have no clue how the buttons affected the date! Now I've tried to fix it, and everything is back to the way it was when I first uploaded it, and nothing's working! ???

Help much appreciated. Thanks.
Link to comment
https://forums.phpfreaks.com/topic/34958-newb-errors/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.