statments question

admin

Administrator
Staff member
In php5 is there still the else statment? Cause I am reading the book php5 and mysql for dummies, and it doesn't have anything in there about the else statment.Have you tried using it yet?I have tried, but I keep getting errors, I don't know if I am putting it in right.what does your code look like?<?
if ($username==Dylan)
{
hello you may contniue
}
else
{
sorry please go back
}
<form action="password.php" method="POST">
<input type=text name="username" value="enter"
?>Originally posted by XxDxX
<?
if ($username==Dylan)
{
hello you may contniue
}
else
{
sorry please go back
}
<form action="password.php" method="POST">
<input type=text name="username" value="enter"
?> I am trying to make a login script.well, if that is literally your exact script...
try wrapping your raw strings in quotes, and use echo, like so (you've also got your ?> in the wrong place):

<?php
if ($username=="Dylan")
{
echo "hello you may contniue";
}
else
{
echo "sorry please go back";
}
?>
<form action="password.php" method="POST">
<input type="text" name="username" value="enter">
...
 
Back
Top