Jump to content



Photo

Need Some Help With Login

login

  • Please log in to reply
3 replies to this topic

#1 Logic

Logic

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 11 August 2012 - 7:58 PM

I am having some problems with this login script. I bought your book and love it. It has helped me out so much and it is much apreciated. This is the problem I am having. When I go to log in i get a error and I can not figure it out.

here is the script:

<?php # Login Script - V1 (login.php)
// This is the login page for the site.
require_once ('includes/config.inc.php');
if (isset($_POST['submitted'])) {
require_once (MYSQL);

// Validate the Username:
if (!empty($_POST['username'])) {
  $un = mysqli_real_escape_string ($dbc, $_POST['username']);
} else {
  $un = FALSE;
  echo '<div class="alert alert-error">You forgot to enter your username!</div>';
}

// Validate the password:
if (!empty($_POST['pass'])) {
  $p = mysqli_real_escape_string ($dbc, $_POST['pass']);
} else {
  $p = FALSE;
  echo '<div class="alert alert-error">You forgot to enter your password!</div>';
}

if ($un && $p) { // If everything's OK.
 
  // Query the database:
  $q = "SELECT user_id, user_level FROM users WHERE (username='$un' AND pass=SHA1('$p')) AND active IS NULL";
  $r = mysqli_query ($dbc, $q) or trigger_error("Query: $q\n<br />MySQL Error: " . mysqli_error($dbc));
 
  if (@mysqli_num_rows($r) == 1) { // A match was made.
  
   // Register the values & redirect:
   $_SESSION = mysqli_fetch_array ($r, MYSQLI_ASSOC);
   mysqli_free_result($r);
   mysqli_close($dbc);
  
   $url = BASE_URL . 'index.php'; // Define the URL.
   ob_end_clean(); // Delete the buffer.
   header("Location: $url");
   exit(); // Quit the script.
  
  } else { // No match was made.
   echo '<div class="alert alert-error">Either the username and password entered do not match those on file or you have not yet activated your account.</div>';
  }
 
} else { // If everything wasn't OK.
  echo '<div class="alert alert-error">Please try again.</div>';
}

mysqli_close($dbc);

} // End of SUBMIT conditional.
?>
  <div class="cnt-boxTop">SuP Clan: Account Log In</div>
  <div class="cnt-boxFiller">
   <div class="cnt-boxInfo">
   <div class="alertbox alert-frame">
    <form class="form-vertical"  action="?page=login" method="post">
	 <fieldset>
	  <div class="float-R">
	  <img alt="" height="64" src="img/lock.png" width="64" style="border:0px" />
	 </div>
	 <div class="control-group">
	   <div class="controls">
	    <div class="input-prepend">
		 <span class="add-on"><i class="icon-user"></i> </span><input placeholder="Username" type="text" class="span3" name="username" />
	    </div>
	   </div>
	 </div>
	
	 <div class="control-group">
	  <div class="controls">
	   <div class="input-prepend">
	    <span class="add-on"><i class="icon-lock"></i> </span><input placeholder="Password" type="password" class="span3" name="pass" />
	   </div>
	  </div>
	 </div>
	
	    <div class="control-group">
			 <div class="controls">
			    <input type="checkbox" id="optionsCheckbox2" value="option1" disabled> Remeber Me <span class="label label-info">Coming Soon</span>
		    </div>
		  </div>
	  
    <center><span class="label label-important">Important:</span> Your browser must allow cookies in order to log in.</center>
	
	 </fieldset>
	 <hr>
	
	 <div align="center"><button type="submit" class="btn btn-primary" /><span class="add-on"><i class="icon-ok"></i> </span>Log In</button> <a class="btn btn-warning" href="#"><span class="add-on"><i class="icon-refresh"></i> </span>Forgot Password?</a></div>
	  <input type="hidden" name="submitted" value="TRUE" />
    </form>
    </div>
   </div>
  </div>
  <div class="cnt-boxFoot">
   <div class="author"></div>
  </div>
</div>

and this is the error I get when i log in:

Date/Time: 8-11-2012 20:55:43
Array
(
[GLOBALS] => Array
*RECURSION*
[_ENV] => Array
(
[CONTENT_LENGTH] => 44
[CONTENT_TYPE] => application/x-www-form-urlencoded
[DOCUMENT_ROOT] => /home/doggysty/public_html/wosnew
[GATEWAY_INTERFACE] => CGI/1.1
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5
[HTTP_CONNECTION] => keep-alive
[HTTP_COOKIE] => EnvoUserInstance64682=ZH00X6dnPFsgko; EnvoEdgeURL64682=edge9rx3.envolve.com; EnvOff64682=true
[HTTP_HOST] => wosbeta.selectunitedplayers.com
[HTTP_REFERER] => http://wosbeta.selec...com/?page=login
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/16.0 Firefox/16.0
[PATH] => /bin:/usr/bin
[QUERY_STRING] => page=login
[REDIRECT_STATUS] => 200
[REMOTE_ADDR] => 71.173.82.89
[REMOTE_PORT] => 49898
[REQUEST_METHOD] => POST
[REQUEST_URI] => /?page=login
[SCRIPT_FILENAME] => /home/doggysty/public_html/wosnew/index.php
[SCRIPT_NAME] => /index.php
[SERVER_ADDR] => 184.172.150.64
[SERVER_ADMIN] => webmaster@wosbeta.selectunitedplayers.com
[SERVER_NAME] => wosbeta.selectunitedplayers.com
[SERVER_PORT] => 80
[SERVER_PROTOCOL] => HTTP/1.1
[SERVER_SIGNATURE] => Apache Server at wosbeta.selectunitedplayers.com Port 80

[SERVER_SOFTWARE] => Apache
[UNIQUE_ID] => UCb-D7isjcwAAEv2Xb0AAAG8
)

[HTTP_ENV_VARS] => Array
(
[CONTENT_LENGTH] => 44
[CONTENT_TYPE] => application/x-www-form-urlencoded
[DOCUMENT_ROOT] => /home/doggysty/public_html/wosnew
[GATEWAY_INTERFACE] => CGI/1.1
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5
[HTTP_CONNECTION] => keep-alive
[HTTP_COOKIE] => EnvoUserInstance64682=ZH00X6dnPFsgko; EnvoEdgeURL64682=edge9rx3.envolve.com; EnvOff64682=true
[HTTP_HOST] => wosbeta.selectunitedplayers.com
[HTTP_REFERER] => http://wosbeta.selec...com/?page=login
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/16.0 Firefox/16.0
[PATH] => /bin:/usr/bin
[QUERY_STRING] => page=login
[REDIRECT_STATUS] => 200
[REMOTE_ADDR] => 71.173.82.89
[REMOTE_PORT] => 49898
[REQUEST_METHOD] => POST
[REQUEST_URI] => /?page=login
[SCRIPT_FILENAME] => /home/doggysty/public_html/wosnew/index.php
[SCRIPT_NAME] => /index.php
[SERVER_ADDR] => 184.172.150.64
[SERVER_ADMIN] => webmaster@wosbeta.selectunitedplayers.com
[SERVER_NAME] => wosbeta.selectunitedplayers.com
[SERVER_PORT] => 80
[SERVER_PROTOCOL] => HTTP/1.1
[SERVER_SIGNATURE] => Apache Server at wosbeta.selectunitedplayers.com Port 80

[SERVER_SOFTWARE] => Apache
[UNIQUE_ID] => UCb-D7isjcwAAEv2Xb0AAAG8
)

[_POST] => Array
(
[username] => logic
[pass] => 11758kids
[submitted] => TRUE
)

[HTTP_POST_VARS] => Array
(
[username] => logic
[pass] => 11758kids
[submitted] => TRUE
)

[_GET] => Array
(
[page] => login
)

[HTTP_GET_VARS] => Array
(
[page] => login
)

[_COOKIE] => Array
(
[EnvoUserInstance64682] => ZH00X6dnPFsgko
[EnvoEdgeURL64682] => edge9rx3.envolve.com
[EnvOff64682] => true
)

[HTTP_COOKIE_VARS] => Array
(
[EnvoUserInstance64682] => ZH00X6dnPFsgko
[EnvoEdgeURL64682] => edge9rx3.envolve.com
[EnvOff64682] => true
)

[_SERVER] => Array
(
[CONTENT_LENGTH] => 44
[CONTENT_TYPE] => application/x-www-form-urlencoded
[DOCUMENT_ROOT] => /home/doggysty/public_html/wosnew
[GATEWAY_INTERFACE] => CGI/1.1
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5
[HTTP_CONNECTION] => keep-alive
[HTTP_COOKIE] => EnvoUserInstance64682=ZH00X6dnPFsgko; EnvoEdgeURL64682=edge9rx3.envolve.com; EnvOff64682=true
[HTTP_HOST] => wosbeta.selectunitedplayers.com
[HTTP_REFERER] => http://wosbeta.selec...com/?page=login
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/16.0 Firefox/16.0
[PATH] => /bin:/usr/bin
[QUERY_STRING] => page=login
[REDIRECT_STATUS] => 200
[REMOTE_ADDR] => 71.173.82.89
[REMOTE_PORT] => 49898
[REQUEST_METHOD] => POST
[REQUEST_URI] => /?page=login
[SCRIPT_FILENAME] => /home/doggysty/public_html/wosnew/index.php
[SCRIPT_NAME] => /index.php
[SERVER_ADDR] => 184.172.150.64
[SERVER_ADMIN] => webmaster@wosbeta.selectunitedplayers.com
[SERVER_NAME] => wosbeta.selectunitedplayers.com
[SERVER_PORT] => 80
[SERVER_PROTOCOL] => HTTP/1.1
[SERVER_SIGNATURE] => Apache Server at wosbeta.selectunitedplayers.com Port 80

[SERVER_SOFTWARE] => Apache
[UNIQUE_ID] => UCb-D7isjcwAAEv2Xb0AAAG8
[PHP_SELF] => /index.php
[REQUEST_TIME] => 1344732943
[argv] => Array
(
[0] => page=login
)

[argc] => 1
)

[HTTP_SERVER_VARS] => Array
(
[CONTENT_LENGTH] => 44
[CONTENT_TYPE] => application/x-www-form-urlencoded
[DOCUMENT_ROOT] => /home/doggysty/public_html/wosnew
[GATEWAY_INTERFACE] => CGI/1.1
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5
[HTTP_CONNECTION] => keep-alive
[HTTP_COOKIE] => EnvoUserInstance64682=ZH00X6dnPFsgko; EnvoEdgeURL64682=edge9rx3.envolve.com; EnvOff64682=true
[HTTP_HOST] => wosbeta.selectunitedplayers.com
[HTTP_REFERER] => http://wosbeta.selec...com/?page=login
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/16.0 Firefox/16.0
[PATH] => /bin:/usr/bin
[QUERY_STRING] => page=login
[REDIRECT_STATUS] => 200
[REMOTE_ADDR] => 71.173.82.89
[REMOTE_PORT] => 49898
[REQUEST_METHOD] => POST
[REQUEST_URI] => /?page=login
[SCRIPT_FILENAME] => /home/doggysty/public_html/wosnew/index.php
[SCRIPT_NAME] => /index.php
[SERVER_ADDR] => 184.172.150.64
[SERVER_ADMIN] => webmaster@wosbeta.selectunitedplayers.com
[SERVER_NAME] => wosbeta.selectunitedplayers.com
[SERVER_PORT] => 80
[SERVER_PROTOCOL] => HTTP/1.1
[SERVER_SIGNATURE] => Apache Server at wosbeta.selectunitedplayers.com Port 80

[SERVER_SOFTWARE] => Apache
[UNIQUE_ID] => UCb-D7isjcwAAEv2Xb0AAAG8
[PHP_SELF] => /index.php
[REQUEST_TIME] => 1344732943
[argv] => Array
(
[0] => page=login
)

[argc] => 1
)

[_FILES] => Array
(
)

[HTTP_POST_FILES] => Array
(
)

[_REQUEST] => Array
(
[page] => login
[username] => logic
[pass] => *******
[submitted] => TRUE
[EnvoUserInstance64682] => ZH00X6dnPFsgko
[EnvoEdgeURL64682] => edge9rx3.envolve.com
[EnvOff64682] => true
)

[page] => login
[section] => content
[sub] =>
[path] => content/login.php
[dbc] => mysqli Object
(
)

[un] => logic
[p] => *******
[q] => SELECT user_id, user_level FROM users WHERE (username='logic' AND pass=SHA1('*******')) AND active IS NULL
[r] => mysqli_result Object
(
)

[_SESSION] => Array
(
[user_id] => 1
[user_level] => 1
)

[url] => http://wosbeta.selec...s.com/index.php
)



Date/Time: 8-11-2012 20:55:43

Array
(
[GLOBALS] => Array
*RECURSION*
[_ENV] => Array
(
[CONTENT_LENGTH] => 44
[CONTENT_TYPE] => application/x-www-form-urlencoded
[DOCUMENT_ROOT] => /home/doggysty/public_html/wosnew
[GATEWAY_INTERFACE] => CGI/1.1
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5
[HTTP_CONNECTION] => keep-alive
[HTTP_COOKIE] => EnvoUserInstance64682=ZH00X6dnPFsgko; EnvoEdgeURL64682=edge9rx3.envolve.com; EnvOff64682=true
[HTTP_HOST] => wosbeta.selectunitedplayers.com
[HTTP_REFERER] => http://wosbeta.selec...com/?page=login
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/16.0 Firefox/16.0
[PATH] => /bin:/usr/bin
[QUERY_STRING] => page=login
[REDIRECT_STATUS] => 200
[REMOTE_ADDR] => 71.173.82.89
[REMOTE_PORT] => 49898
[REQUEST_METHOD] => POST
[REQUEST_URI] => /?page=login
[SCRIPT_FILENAME] => /home/doggysty/public_html/wosnew/index.php
[SCRIPT_NAME] => /index.php
[SERVER_ADDR] => 184.172.150.64
[SERVER_ADMIN] => webmaster@wosbeta.selectunitedplayers.com
[SERVER_NAME] => wosbeta.selectunitedplayers.com
[SERVER_PORT] => 80
[SERVER_PROTOCOL] => HTTP/1.1
[SERVER_SIGNATURE] => Apache Server at wosbeta.selectunitedplayers.com Port 80

[SERVER_SOFTWARE] => Apache
[UNIQUE_ID] => UCb-D7isjcwAAEv2Xb0AAAG8
)

[HTTP_ENV_VARS] => Array
(
[CONTENT_LENGTH] => 44
[CONTENT_TYPE] => application/x-www-form-urlencoded
[DOCUMENT_ROOT] => /home/doggysty/public_html/wosnew
[GATEWAY_INTERFACE] => CGI/1.1
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5
[HTTP_CONNECTION] => keep-alive
[HTTP_COOKIE] => EnvoUserInstance64682=ZH00X6dnPFsgko; EnvoEdgeURL64682=edge9rx3.envolve.com; EnvOff64682=true
[HTTP_HOST] => wosbeta.selectunitedplayers.com
[HTTP_REFERER] => http://wosbeta.selec...com/?page=login
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/16.0 Firefox/16.0
[PATH] => /bin:/usr/bin
[QUERY_STRING] => page=login
[REDIRECT_STATUS] => 200
[REMOTE_ADDR] => 71.173.82.89
[REMOTE_PORT] => 49898
[REQUEST_METHOD] => POST
[REQUEST_URI] => /?page=login
[SCRIPT_FILENAME] => /home/doggysty/public_html/wosnew/index.php
[SCRIPT_NAME] => /index.php
[SERVER_ADDR] => 184.172.150.64
[SERVER_ADMIN] => webmaster@wosbeta.selectunitedplayers.com
[SERVER_NAME] => wosbeta.selectunitedplayers.com
[SERVER_PORT] => 80
[SERVER_PROTOCOL] => HTTP/1.1
[SERVER_SIGNATURE] => Apache Server at wosbeta.selectunitedplayers.com Port 80

[SERVER_SOFTWARE] => Apache
[UNIQUE_ID] => UCb-D7isjcwAAEv2Xb0AAAG8
)

[_POST] => Array
(
[username] => logic
[pass] => *******
[submitted] => TRUE
)

[HTTP_POST_VARS] => Array
(
[username] => logic
[pass] => ******
[submitted] => TRUE
)

[_GET] => Array
(
[page] => login
)

[HTTP_GET_VARS] => Array
(
[page] => login
)

[_COOKIE] => Array
(
[EnvoUserInstance64682] => ZH00X6dnPFsgko
[EnvoEdgeURL64682] => edge9rx3.envolve.com
[EnvOff64682] => true
)

[HTTP_COOKIE_VARS] => Array
(
[EnvoUserInstance64682] => ZH00X6dnPFsgko
[EnvoEdgeURL64682] => edge9rx3.envolve.com
[EnvOff64682] => true
)

[_SERVER] => Array
(
[CONTENT_LENGTH] => 44
[CONTENT_TYPE] => application/x-www-form-urlencoded
[DOCUMENT_ROOT] => /home/doggysty/public_html/wosnew
[GATEWAY_INTERFACE] => CGI/1.1
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5
[HTTP_CONNECTION] => keep-alive
[HTTP_COOKIE] => EnvoUserInstance64682=ZH00X6dnPFsgko; EnvoEdgeURL64682=edge9rx3.envolve.com; EnvOff64682=true
[HTTP_HOST] => wosbeta.selectunitedplayers.com
[HTTP_REFERER] => http://wosbeta.selec...com/?page=login
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/16.0 Firefox/16.0
[PATH] => /bin:/usr/bin
[QUERY_STRING] => page=login
[REDIRECT_STATUS] => 200
[REMOTE_ADDR] => 71.173.82.89
[REMOTE_PORT] => 49898
[REQUEST_METHOD] => POST
[REQUEST_URI] => /?page=login
[SCRIPT_FILENAME] => /home/doggysty/public_html/wosnew/index.php
[SCRIPT_NAME] => /index.php
[SERVER_ADDR] => 184.172.150.64
[SERVER_ADMIN] => webmaster@wosbeta.selectunitedplayers.com
[SERVER_NAME] => wosbeta.selectunitedplayers.com
[SERVER_PORT] => 80
[SERVER_PROTOCOL] => HTTP/1.1
[SERVER_SIGNATURE] => Apache Server at wosbeta.selectunitedplayers.com Port 80

[SERVER_SOFTWARE] => Apache
[UNIQUE_ID] => UCb-D7isjcwAAEv2Xb0AAAG8
[PHP_SELF] => /index.php
[REQUEST_TIME] => 1344732943
[argv] => Array
(
[0] => page=login
)

[argc] => 1
)

[HTTP_SERVER_VARS] => Array
(
[CONTENT_LENGTH] => 44
[CONTENT_TYPE] => application/x-www-form-urlencoded
[DOCUMENT_ROOT] => /home/doggysty/public_html/wosnew
[GATEWAY_INTERFACE] => CGI/1.1
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5
[HTTP_CONNECTION] => keep-alive
[HTTP_COOKIE] => EnvoUserInstance64682=ZH00X6dnPFsgko; EnvoEdgeURL64682=edge9rx3.envolve.com; EnvOff64682=true
[HTTP_HOST] => wosbeta.selectunitedplayers.com
[HTTP_REFERER] => http://wosbeta.selec...com/?page=login
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/16.0 Firefox/16.0
[PATH] => /bin:/usr/bin
[QUERY_STRING] => page=login
[REDIRECT_STATUS] => 200
[REMOTE_ADDR] => 71.173.82.89
[REMOTE_PORT] => 49898
[REQUEST_METHOD] => POST
[REQUEST_URI] => /?page=login
[SCRIPT_FILENAME] => /home/doggysty/public_html/wosnew/index.php
[SCRIPT_NAME] => /index.php
[SERVER_ADDR] => 184.172.150.64
[SERVER_ADMIN] => webmaster@wosbeta.selectunitedplayers.com
[SERVER_NAME] => wosbeta.selectunitedplayers.com
[SERVER_PORT] => 80
[SERVER_PROTOCOL] => HTTP/1.1
[SERVER_SIGNATURE] => Apache Server at wosbeta.selectunitedplayers.com Port 80

[SERVER_SOFTWARE] => Apache
[UNIQUE_ID] => UCb-D7isjcwAAEv2Xb0AAAG8
[PHP_SELF] => /index.php
[REQUEST_TIME] => 1344732943
[argv] => Array
(
[0] => page=login
)

[argc] => 1
)

[_FILES] => Array
(
)

[HTTP_POST_FILES] => Array
(
)

[_REQUEST] => Array
(
[page] => login
[username] => logic
[pass] => ********
[submitted] => TRUE
[EnvoUserInstance64682] => ZH00X6dnPFsgko
[EnvoEdgeURL64682] => edge9rx3.envolve.com
[EnvOff64682] => true
)

[page] => login
[section] => content
[sub] =>
[path] => content/login.php
[dbc] => mysqli Object
(
)

[un] => logic
[p] => *******
[q] => SELECT user_id, user_level FROM users WHERE (username='logic' AND pass=SHA1('********')) AND active IS NULL
[r] => mysqli_result Object
(
)

[_SESSION] => Array
(
[user_id] => 1
[user_level] => 1
)

[url] => http://wosbeta.selec...s.com/index.php
)

anyone that could help me that would be great. Mind you that I am not that good with php yet

Thank you
  • 0

#2 HartleySan

HartleySan

    Advanced Member

  • Members
  • PipPipPip
  • 2,932 posts
  • LocationColumbus, OH USA

Posted 11 August 2012 - 11:04 PM

Maybe someone will be nice enough to take the time to read all of that, but if you want to increase your odds of getting an answer, you should probably help us out a bit more.
For example, was the login script working for a while, and now it doesn't? Was it never working at all? Are you new to PHP? Did you buy the book and jump straight to the login script section, or have you been going through each section? Can you possibly narrow down where the error is? Have you tried echoing various values/variables to the screen to ensure that you're getting the values you expect?
Basically, please provide us with some more info, and hopefully we can better help. Thanks.
  • 0

#3 Logic

Logic

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 12 August 2012 - 12:53 PM

Sorry about that I wasn't really paying attention to what I was doing when I posted this. I have figured out the problem though.

1. I was using mysql instead of mysqli so that was where alot of my problems and error's were coming from.
2. My index.php file contained alot of whitespaces (invalid characters).

Once I fixed all of that everything works like a charm.
I will make sure next time I will provide more information on my problems. And yes I am new to PHP and MYSQL but it is a good learning experiance though.

Once again thanks again for your time and the great book. I am almost done reading it and can't wait to finish. Thanks
  • 1

#4 Larry

Larry

    Administrator/Writer

  • Administrators
  • 3,908 posts
  • LocationState College, PA (USA)

Posted 13 August 2012 - 7:27 AM

Kudos for figuring it out and thanks for sharing the solution. Thanks, too, for the nice words on the book.
  • 0