To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > PHP Help > Upgrading PHP

Upgrading PHP Issues concerning PHP version upgrades and future releases

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-16-2004, 12:39 PM   #1
XxDxX
Junior Member
 
Join Date: Jul 2004
Location: Chicago,IL,USA
Posts: 22
statments question

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.
XxDxX is offline   Reply With Quote
Old 07-16-2004, 01:12 PM   #2
goldbug
50,000 Watts of Goodwill
 
goldbug's Avatar
 
Join Date: May 2003
Location: Rummaging through your garbage.
Posts: 1,326
Have you tried using it yet?
__________________
Many eyes make few mistakes

goldendance
goldbug is offline   Reply With Quote
Old 07-16-2004, 01:18 PM   #3
XxDxX
Junior Member
 
Join Date: Jul 2004
Location: Chicago,IL,USA
Posts: 22
I have tried, but I keep getting errors, I don't know if I am putting it in right.
XxDxX is offline   Reply With Quote
Old 07-16-2004, 01:31 PM   #4
goldbug
50,000 Watts of Goodwill
 
goldbug's Avatar
 
Join Date: May 2003
Location: Rummaging through your garbage.
Posts: 1,326
what does your code look like?
__________________
Many eyes make few mistakes

goldendance
goldbug is offline   Reply With Quote
Old 07-16-2004, 01:42 PM   #5
XxDxX
Junior Member
 
Join Date: Jul 2004
Location: Chicago,IL,USA
Posts: 22
PHP Code:
<?
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"
?>
XxDxX is offline   Reply With Quote
Old 07-16-2004, 01:43 PM   #6
XxDxX
Junior Member
 
Join Date: Jul 2004
Location: Chicago,IL,USA
Posts: 22
Quote:
Originally posted by XxDxX
PHP Code:
<?
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.
XxDxX is offline   Reply With Quote
Old 07-16-2004, 02:22 PM   #7
goldbug
50,000 Watts of Goodwill
 
goldbug's Avatar
 
Join Date: May 2003
Location: Rummaging through your garbage.
Posts: 1,326
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 Code:
<?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">
...
__________________
Many eyes make few mistakes

goldendance
goldbug is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 08:48 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.