Jump to content
xisto Community
Sign in to follow this  
HmmZ

Is This Any Good? Sucky webdesigner asking for feedback

Recommended Posts

okay i thot id never seee anything crazy on trap27 but its official this is just annoying lol, well as much as we would like to tell you whether or not your script works it would be good to actually see it on a page then debug it from there, i mean going over the source code like that is just something we cannot do, i mean i cant even look at my own source code. like dat, so post it online well put it some tests and then we will get back at you...

Share this post


Link to post
Share on other sites

hey this is the error in your code, you see, you start html output before you start the session you should always start your session before you output anything to the browser, since starting a session initiates the session cookie, so instead of your script being as.

<html><head><link rel="stylesheet" type="text/css" href="http://forums.xisto.com/no_longer_exists/;
<?php
session_start();

it should be

<?phpsession_start();
?>
<html>
<head><link rel="stylesheet" type="text/css" href="http://forums.xisto.com/no_longer_exists/;
<?php
//the rest of your php code
?>

now do that and you wont get that annoying error anymore.....
hope this helps
if you have any problems pm me.

Share this post


Link to post
Share on other sites

Replying to Stevey's last post about this (was in the wrong thread/board)

First of all, it would already be a monster size for the index.php, while these only are the header and menu boxes =/, anywayz, I tried it and it returned the following error on my webbie:

Parse error: parse error, unexpected '}' in /home/ridouan/public_html/Online/Index.php on line 171

Tried to lookup line 171 (sucks when the lines are not numbered :D), this is the closest i got (it's somewhere in this piece):
//you really need to be care ful with what is posted dont trust your users//e.g trim the post variable for any characters, and you may want to use regular//expressions to see if the values are valid . here is a small example/*$user=trim($_POST['user']);$pass=trim($_POST['pass']);*/$query = mysql_query("SELECT * FROM tbl_users WHERE user_name = '" . $_POST['user'] . "' AND user_pass = '" . md5($_POST['pass']) . "'");$result = mysql_num_rows($query);if(empty($result)){echo "<script>alert('Login Incorrect.'); document.location.href=('Index.php')</script>";}else{while($row = mysql_fetch_assoc($query)){$user_id = $row['user_id'];}/*this is your other mistake you sent the header then registered the sessionvariable that wont happen the session variable wont be registerdyou need to register the session variable then redirect the browseryou may want to use relative links they are easy to maintaininstead of http://forums.xisto.com/no_longer_exists/ should use index.phpor ../index.phpif index.php is in the root directory.*///if everything is okay register the session//you may want to start the session heresession_start();session_register('user_id');$_SESSION['user_id'] = $user_id;//redirect the user to the main page.header("Location: http://forums.xisto.com/no_longer_exists/;

Of course i checked on the }`s, but seems they are all positioned correctly :s

Share this post


Link to post
Share on other sites

okay now this code is really starting to get on my nerves lol, so heres what well do, just tell me what your are trying to accomplish with your script and then ill give you a step by step script on how you can do that, e.g just name a feature you want in your site, then ill try code it and post it here for you, then you name another feature ill code it and then post it here. okay, that way it will be easier for me to work out what is wrong.

Share this post


Link to post
Share on other sites

Uhm...AllrightBut first off, let's close this thread as all those codes are really getting on my nerves aswell :DI'll make a new thread where we can start from scratch and at the end (when my webbie is finally finished) we can write a book..."The PHP/MySQL book of errors"...! :DNew thread will be called "Website process" (no im not original)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.