if, elseif, else

navigation options

Page 1 of 1

9 Replies - 1583 Views - Last Post: 10 March 2009 - 09:22 AM Rate Topic: -----

#1 cms247  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 21-February 09

if, elseif, else

Posted 01 March 2009 - 06:20 PM

Hi,

I'm building a photography site using the test server xamp and am trying to use an 'if, elseif, else' block of code to generate alternative navigations depending on login details....

The code is posted below but here is a brief 'in english' description of what I'm trying to do

-select all the data from tb_login (f_id, f_user, f_pass)
-if the person browsing is not a member / not logged in > print the visitors navigation
-if the person browsing logs in > print the members navigation
-if the id (f_id) of the person logging in is equal to 1 > pint the administrative navigation

At the moment when you first visit the site the visitors navigation loads.
When you login in with a members id details the members navigation loads.
When you login with the intended administrator login details the members navigation, not the administrative navigation, loads.

The select all query from the login table seems to working. A connection to the relivant database is made in the head section of the page already

I have a feeling there is something wrong with how I'm using the if functions and / or how I'm odering them but I don't have a clue what...

$query = "
	SELECT * 
	FROM
	tb_login
	";
$result = mysql_query($query) or die ("The Select all query from the login table for the nav options failed");

		
		 //admin navigation
if (isset ($_SESSION['name'])&& $row[0] == 1){
print 	"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=upload'>Upload</a> 
	<a href='index.php?page=addressBook'>Address Book</a>";

	//members navigation
}elseif (isset ($_SESSION['name'])&& $row[0]!== 1){
print 	"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=upload'>Upload</a> |
	<a href='index.php?page=competitions'>competitions</a>
	<a href='index.php?page=memberAddress'>My contact Details</a> |
	<a href='index.php?page=contact'>Contact Us</a> |";
}else{
	//visitors navigation
print"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=contact'>contact Us</a> |
	<a href='index.php?page=register'>Register</a>";
}

mysql_close($conn)




any help will be appreciated

Is This A Good Question/Topic? 0
  • +

Replies To: if, elseif, else

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4354
  • View blog
  • Posts: 12,160
  • Joined: 18-April 07

Re: if, elseif, else

Posted 01 March 2009 - 07:40 PM

Well syntax is good assuming you actually successfully created $row. I don't see where you are actually creating that. You should have a statement like ...

 
$row = mysql_fetch_array($result);



... in there somewhere and I don't know if you just left it out or not. So assuming you did this part correctly, the only way that you would be skipping over the admin login is if the session variable was not set and $row[0] was not set to 1.

So before this if statement, print out the value of $row[0] and see what is actually in there. My guess is that it is either empty (because you didn't create the array correctly from the database results) or it is not the value you expect (the value 1).

I am focusing on the $row because you said that you get the members navigation when you login as an admin so that means that your session variable is in fact set, but that your $row[0] is not equal to 1. So check out the value of $row[0] and see what value it is.

If you continue to have problems let us know and also show us more of the code where you go from database result to $row variable. As well as the value of $row[0] prior to the if statement.

:)

This post has been edited by Martyr2: 01 March 2009 - 07:41 PM

Was This Post Helpful? 0
  • +
  • -

#3 cms247  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 21-February 09

Re: if, elseif, else

Posted 02 March 2009 - 07:08 AM

Hi Martyr2

I added the missing statement
 
$row = mysql_fetch_array($result);


just below the select query that is included in the snippet of code I posted above.


Now what happens is when either a members login details are used or the administrators login details are used, the admin navigation loads.

At the moment the login table only contains the details of the administrator and one member.
There are only four fields in the login table
f_id (which is an auto increment interger)
f_user (the users name)
f_pass (their password)
f_time
The administrator was the first record that I created in the login table so it is my understanding that when they login $row[0], the f_id field is equal to 1. When I browse the login table in phpMyAdmin the the number in the the administrators f_id field is 1

QUESTION 1
Should the admin navigation test require there to be a match to the admin password as well as a test to see if $row[0] is equal to 1. If so how would I add the first if test:
if (isset ($_SESSION['name'])&& $row[0] == 1)


The page structure is such that the login div is inside the bannerWrapper with the main div beneath.
I placed a print_r($row) statement in main div.

QUESTION 2
The results of the print_r() statement are making me begin to wonder if the navigation is behaving the way it is because there is something wrong with my session code. I've never used session code before so am very uncertain about it...
For some reason the session isn't dying properly - when I log out as administrator the navigation goes back to the visitors option but the print_r($row) still displays the administrators details in the main div.
When I proceed to login as a member the print_r($row) results are still the administrators.
When I close the site down and go back to it the administrators details are still displayed in the main div.

Here is all the code for the page

<?php
session_start();
	include('includes/functions.php');

$user = $_POST['user'];
$pass = sha1($_POST['pass']);

$conn = dbConnect();
dbSelect();

if (isset($user) && $user != null){

$query="SELECT
	count(*)
	FROM
	tb_login
	WHERE
	f_user='$user'
	AND
	f_pass='$pass'
";
$count = @mysql_result(@mysql_query($query), 0);

/*if the login is invalid do nothing. the user has failed to login, 
If $count is equal to 1 a session will start.*/
	if ($count == 0){	
		
	}else{			
				
		$_SESSION['name'] = $user;
		$_SESSION['start'] = time();
				
		$my_timestamp = date("Y-m-d H:i:s", time());
				
		$query = "
		UPDATE
		tb_login
		SET
		f_time='$my_timestamp'
		where
		f_user='$user'
		and
		f_pass='$pass'
		";
		
		mysql_query($query) or die ("Unable to update the timestamp");
		
		/*				
		if (isset($_GET['page'])){
		$page = $_GET['page'];
		}
		*/
		
		/*TO DO: Create a new test in this section to see if user wanted a secuere session or 
		is happy with a cookie.  At the moment this code assumes a session*/
		
		setcookie("USER",$user, time()+60*60*24*1);
		
		}
	}


if ($_POST['logout'] == "yes"){

$CookieInfo = session_get_cookie_params();
		if ( (empty($CookieInfo['domain'])) && (empty($CookieInfo['secure'])) ) {
		setcookie(session_name(), '', time()-3600, $CookieInfo['path']);
		} elseif (empty($CookieInfo['secure'])) {
		setcookie(session_name(), '', time()-3600, $CookieInfo['path'], $CookieInfo['domain']);
		} else {
		setcookie(session_name(), '', time()-3600, $CookieInfo['path'], $CookieInfo['domain'], $CookieInfo['secure']);
		}
		unset($_COOKIE[session_name()]);
		session_destroy(); 
		$security="";
		
	
$_SESSION['name']= null; 
$page = "";
}

/*
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
}else{
print "incorrect or invalid login details"; FIGURE OUT WHERE TO PUT THIS PRINT STATEMENT
}
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ
*/


php?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<title>Remember This</title>
<link rel="stylesheet" type="text/css" href="css/styles.css" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="description" content=" " />
<meta name="keywords" content=" " />
</head>


<body>

<br />

<div id="bannerWrapper">

<div id="menu">
<?php	

$query = "
	SELECT * 
	FROM
	tb_login
	";
$result = mysql_query($query) or die ("The Select all query from the login table for the nav options failed");

$row = mysql_fetch_array($result);

		
		 //admin navigation
if (isset ($_SESSION['name'])&& $row[0] == 1){
print 	"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=upload'>Upload</a> |
	<a href='index.php?page=addressBook'>Address Book</a>";

	
	//members navigation
}elseif (isset ($_SESSION['name'])&& $row[0]!== 1){
print 	"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=upload'>Upload</a> |
	<a href='index.php?page=competitions'>competitions</a>
	<a href='index.php?page=memberAddress'>My contact Details</a> |
	<a href='index.php?page=contact'>Contact Us</a> |";
}else{
	//visitors navigation
print"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=contact'>contact Us</a> |
	<a href='index.php?page=register'>Register</a>";
}

mysql_close($conn)

	
?>

</div>
	
	<div id="logo"></div>
	
	<div id="login">
	<?php
	if (!isset($_SESSION['name'])){
	
	?>
		<!-- form a is the successful login form of the if directly above-->
		<form action="<?php print htmlspecialchars($_SERVER['REQUEST_URI']);?>" method="post">
		<!-- see htmlspecialchars($_SERVER['REQUEST_URI']) explained-->
						
			<fieldset>
				<legend>
					User Login
				</legend>
				
				<label for="user">
					<div class="fields">User name</div>
					<input class="boxes" type="text" id="user" name="user" size="15" /><br />
				</label>
				
				<label for="pass">
					<div class="fields">Password</div>
					<input class="boxes" type="password" id="pass" name="pass" size="15" />						   <br/>
				</label>				
			</fieldset>
			
			<fieldset>
				<legend>
					Security Level
				</legend>
				
				<label for="cookie">
					Cookie <!-- safe for home browsing -->
					<input type="radio" name="sessionType" id="cookie" />
				</label>
				
				<label for="session">
					Secure Session <!-- safe for public browsing -->
					<input type="radio" name="sessionType" id="session">
				</label>
				
			<input class="logInButton" type="submit" value="log in" />
			</fieldset>
			
		</form>
		
	<?php
	}else{
	
	?>
	
	<form action="index.php?page=logout" method="post" >
	<?php
	print"welcome $user";
		
	?>
	
	<br /><br />
	
	<input type="hidden" name="logout" value="yes" >
	<input type="submit" value="Log out">
	
	
	</form>

	
	<?php
	}
	?>
	
	</div>
</div>


<div id="mainWrapper">

<?php



if (!isset($_GET['page'])){
	$page = "home";
}else{
	$page = $_GET['page'];
}
switch ($page) 
{
case "home":
  include('includes/homepage.php');
  break;
case "upload": 
  include('includes/upload.php');
  break;
case "gallery": 
  include('includes/gallery.php');
  break;
case "contact": 
  include('includes/contact.php');
  break;
case "competitions": 
  include('includes/competitions.php');
  break;
case "register": 
  include('includes/register.php');
  break;
case "memberAddress": 
  include('includes/memberAddress.php');
  break;
case "addressBook": 
  include('includes/addressBook.php');
  break;
default:
  include('includes/homepage.php');
}

print_r($row)





?>


</div>


<div id="negetiveEffect">
	<?php include('includes/negetiveEffect.php');?>	
</div>

<div id="credits"> </div>
</body>

</html>




Again, any help would be much appreciated
Was This Post Helpful? 0
  • +
  • -

#4 kiwi2  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 8
  • View blog
  • Posts: 178
  • Joined: 16-September 08

Re: if, elseif, else

Posted 02 March 2009 - 10:48 AM

the way I see it and I cld be wrong here is that if your var is equal to 1 or not equal to one ends your if statement right there either the one or the other which leaves your else hanging with nowhere to go, you need two absolute conditionals and an alternative
Was This Post Helpful? 0
  • +
  • -

#5 laces12  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 69
  • Joined: 20-November 08

Re: if, elseif, else

Posted 02 March 2009 - 10:58 AM

View Postcms247, on 1 Mar, 2009 - 05:20 PM, said:

Hi,

I'm building a photography site using the test server xamp and am trying to use an 'if, elseif, else' block of code to generate alternative navigations depending on login details....

The code is posted below but here is a brief 'in english' description of what I'm trying to do

-select all the data from tb_login (f_id, f_user, f_pass)
-if the person browsing is not a member / not logged in > print the visitors navigation
-if the person browsing logs in > print the members navigation
-if the id (f_id) of the person logging in is equal to 1 > pint the administrative navigation

At the moment when you first visit the site the visitors navigation loads.
When you login in with a members id details the members navigation loads.
When you login with the intended administrator login details the members navigation, not the administrative navigation, loads.

The select all query from the login table seems to working. A connection to the relivant database is made in the head section of the page already

I have a feeling there is something wrong with how I'm using the if functions and / or how I'm odering them but I don't have a clue what...

$query = "
	SELECT * 
	FROM
	tb_login
	";
$result = mysql_query($query) or die ("The Select all query from the login table for the nav options failed");

		
		 //admin navigation
if (isset ($_SESSION['name'])&& $row[0] == 1){
print 	"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=upload'>Upload</a> 
	<a href='index.php?page=addressBook'>Address Book</a>";

	//members navigation
}elseif (isset ($_SESSION['name'])&& $row[0]!== 1){
print 	"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=upload'>Upload</a> |
	<a href='index.php?page=competitions'>competitions</a>
	<a href='index.php?page=memberAddress'>My contact Details</a> |
	<a href='index.php?page=contact'>Contact Us</a> |";
}else{
	//visitors navigation
print"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=contact'>contact Us</a> |
	<a href='index.php?page=register'>Register</a>";
}

mysql_close($conn)




any help will be appreciated



Now, I could be wrong, but shouldn't two statments in a if statement look like this:

if (isset ($_SESSION['name'])&& ($row[0] == 1)){



Am I right?
Was This Post Helpful? 0
  • +
  • -

#6 kiwi2  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 8
  • View blog
  • Posts: 178
  • Joined: 16-September 08

Re: if, elseif, else

Posted 02 March 2009 - 11:11 AM

View Postlaces12, on 2 Mar, 2009 - 09:58 AM, said:

View Postcms247, on 1 Mar, 2009 - 05:20 PM, said:

Hi,

I'm building a photography site using the test server xamp and am trying to use an 'if, elseif, else' block of code to generate alternative navigations depending on login details....

The code is posted below but here is a brief 'in english' description of what I'm trying to do

-select all the data from tb_login (f_id, f_user, f_pass)
-if the person browsing is not a member / not logged in > print the visitors navigation
-if the person browsing logs in > print the members navigation
-if the id (f_id) of the person logging in is equal to 1 > pint the administrative navigation

At the moment when you first visit the site the visitors navigation loads.
When you login in with a members id details the members navigation loads.
When you login with the intended administrator login details the members navigation, not the administrative navigation, loads.

The select all query from the login table seems to working. A connection to the relivant database is made in the head section of the page already

I have a feeling there is something wrong with how I'm using the if functions and / or how I'm odering them but I don't have a clue what...

$query = "
	SELECT * 
	FROM
	tb_login
	";
$result = mysql_query($query) or die ("The Select all query from the login table for the nav options failed");

		
		 //admin navigation
if (isset ($_SESSION['name'])&& $row[0] == 1){
print 	"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=upload'>Upload</a> 
	<a href='index.php?page=addressBook'>Address Book</a>";

	//members navigation
}elseif (isset ($_SESSION['name'])&& $row[0]!== 1){
print 	"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=upload'>Upload</a> |
	<a href='index.php?page=competitions'>competitions</a>
	<a href='index.php?page=memberAddress'>My contact Details</a> |
	<a href='index.php?page=contact'>Contact Us</a> |";
}else{
	//visitors navigation
print"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=contact'>contact Us</a> |
	<a href='index.php?page=register'>Register</a>";
}

mysql_close($conn)




any help will be appreciated



Now, I could be wrong, but shouldn't two statments in a if statement look like this:

if (isset ($_SESSION['name'])&& ($row[0] == 1)){



Am I right?

I think the logic is flawed if it's equal to 1 but not equal to 1 the second statement means it can be equal to anything other than one which means that the else statment is the same as the !== statement
Was This Post Helpful? 0
  • +
  • -

#7 cms247  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 21-February 09

Re: if, elseif, else

Posted 02 March 2009 - 06:07 PM

Hi people,

thanks for the feed back.

It I won't be doing any more coding tonight. And unfortunately due to other commitments I won't be able to code until this coming Sunday and Monday.

I'll be able to fully consider all that has been told to me then.

thanks again :)
Was This Post Helpful? 0
  • +
  • -

#8 cms247  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 21-February 09

Re: if, elseif, else

Posted 08 March 2009 - 04:33 PM

Ok

I tried adding Laces12 suggested syntax for when there are two statements in an if
 if (isset ($_SESSION['name'])&& ($row[0] == 1)){

and it hasn't made any difference to how the page behaves under the varying circumstances. So I can't tell you whether this suggestion was right or wrong!


Before I tell you my understanding of Kiwi2's suggestions I'm going to re-paste just the suspect block of 'if' code here....
$query = "
	SELECT * 
	FROM
	tb_login
	";
$result = mysql_query($query) or die ("The Select all query from the login table for the nav options failed");

$row = mysql_fetch_array($result);

		
		 //admin navigation.....original if: if (isset ($_SESSION['name'])&& $row[0] == 1)
if (isset ($_SESSION['name'])&& ($row[0] == 1)){
print 	"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=upload'>Upload</a> |
	<a href='index.php?page=addressBook'>Address Book</a>";

	
	//members navigation....original elseif: elseif (isset ($_SESSION['name'])&& $row[0]!== 1)
}elseif (isset ($_SESSION['name'])&& ($row[0]!== 1)){
print 	"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=upload'>Upload</a> |
	<a href='index.php?page=competitions'>competitions</a>
	<a href='index.php?page=memberAddress'>My contact Details</a> |
	<a href='index.php?page=contact'>Contact Us</a> |";
}else{
	//visitors navigation
print"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=contact'>contact Us</a> |
	<a href='index.php?page=register'>Register</a>";
}

mysql_close($conn)


And this is what this code is doing at the moment
- when not logged in OR when you log out, the visitors navigation kicks in.
- when you are logged in with the current admin details OR with a members login details the admin navigation kicks in.
- the members navigation DOESN'T ever kick in.

Kiwi2 said

Quote

the way I see it and I cld be wrong here is that if your var is equal to 1 or not equal to one ends your if statement right there either the one or the other which leaves your else hanging with nowhere to go, you need two absolute conditionals and an alternative...... I think the logic is flawed if it's equal to 1 but not equal to 1 the second statement means it can be equal to anything other than one which means that the else statment is the same as the !== statement


Maybe I still can't see the wood for the leaves but I was under the impression that I had given 2 absolute conditions and an alternative in the existing if, esleif, if structure, hence:

if the condition for the admin nav is that a session has started and the login details are those of the administrators only

elseif the condition for the members nav is that a session has started and the login details are those of any members but not the administrators

else the condition for the visitors nav is that a session has not started, the person is not logged in,

Has anyone got any more feed-back about why no distinction is currently being made between the admin login and members login?
Was This Post Helpful? 0
  • +
  • -

#9 no2pencil  Icon User is online

  • Admiral Fancy Pants
  • member icon

Reputation: 5354
  • View blog
  • Posts: 27,313
  • Joined: 10-May 07

Re: if, elseif, else

Posted 08 March 2009 - 07:10 PM

Here is how I would code it... but I'm known for not doing things correctly:P
print	 "<a href='index.php?page=home'>Home</a> |
<a href='index.php?page=gallery'>Gallery</a> |
<a href='index.php?page=upload'>Upload</a> |";

if (isset ($_SESSION['name'])) {
	if($row[0] == 1) {
	  print "<a href='index.php?page=competitions'>competitions</a>
	  <a href='index.php?page=memberAddress'>My contact Details</a> |
	  <a href='index.php?page=contact'>Contact Us</a> |";
	}
	else {
	   print "<a href='index.php?page=addressBook'>Address Book</a>";
	}
}
else{
	//visitors navigation
	print "<a href='index.php?page=contact'>contact Us</a> |
	<a href='index.php?page=register'>Register</a>";
}



I always try to avoid printing the same text, redundantly, in both the if & the else conditions. Just simplify it & deal with what needs to be dealt with in the conditional statements.
Was This Post Helpful? 0
  • +
  • -

#10 cms247  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 21-February 09

Re: if, elseif, else

Posted 10 March 2009 - 09:22 AM

Hi all,

When in class last night I found out where my logic was wrong.....
Firstly I needed a WHERE clause in the select all query on the login table.
Secondly I needed to adjust the syntax in the elseif from !==1 to !=1

Hence this code works fine


$query = "
	SELECT * 
	FROM
	tb_login
	WHERE
	f_user = '".$_SESSION['name']."'
	";
$result = mysql_query($query) or die ("The Select all query from the login table for the nav options failed");

$row = mysql_fetch_array($result);
		
		 //admin navigation
if (isset ($_SESSION['name'])&& $row[0] == 1){
print 	"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=cinema'>Cinema</a> |
	<a href='index.php?page=uploadImages'>Upload Images</a> |
	<a href='index.php?page=uploadVideos'>Upload Videos</a> |
	<a href='index.php?page=uploadCompetitions'>Upload Competitions</a> | 
	<a href='index.php?page=addressBook'>Address Book</a>";
	//members navigation
}elseif (isset ($_SESSION['name'])&& $row[0]!= 1){
print 	"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>gallery</a> |
	<a href='index.php?page=cinema'>Cinema</a> |
	<a href='index.php?page=competitions'>competitions</a> |
	<a href='index.php?page=memberAddress'>My contact Details</a> |
	<a href='index.php?page=contactUs'>Contact Us</a> |";
}else{
	//visitors navigation
print"<a href='index.php?page=home'>Home</a> |
	<a href='index.php?page=gallery'>Gallery</a> |
	<a href='index.php?page=contactUs'>contact Us</a> |
	<a href='index.php?page=register'>Register</a>";
}
mysql_close($conn)



I know Kiwi2 suggested my logic was wrong earlier in this thread but I have to admit I'm not that strong yet on reading and understanding all of what php logic does and therefore how to rectify any missing bits..... This is also why I will wait until I'm certain on all the pages / includes the site will contain before I get to the bottom of no2pencil's suggested if else layout.

For others that feel nervous about logic, there's a nerdy ( ;) ) tutorial on this site!
http://www.dreaminco...wtopic53455.htm

I also googled 'how php is formatted using logic" and found an article that does a good job of making logic sound like english....
http://www.htmlgoodi...cle.php/3472481


Thanks for all the tips and suggestions everyone :D
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1