Search
Left Quote    I think there is a world market for maybe five computers.
- Thomas Watson, Chairman of IBM 1943    
Right Quote
 
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply


        Viewing Topic: "Member System Sample!"
  This user is offline  misterhaan
  Subject: "re: Member System Sample!" Posted: @ 3:19 pm on Jan 05 2009    

Member #: 5
Rank: User - (213)
Since: 02/11/05
Posts: 148
From: chair

also, session_start() sends a cookie, so if used without ob_start() it needs to be before any non-header output from the script.




please note that the above post is likely made up in its entirety.

    Viewed: 1,971 Times | Reply to This | To top
  This user is offline  jbourne
  Subject: "re: Member System Sample!" Posted: @ 5:01 pm on Feb 01 2009    
Member #: 840
Rank: User - (2)
Since: 02/01/09
Posts: 2

Very Good!!....BUT I have one problem

the register script does not seem to work when user inputs existing username.....it just completes registration and inputs duplicate into sql.

Can anyone comment on a fix or what i might have wrong.

Thanx




    Viewed: 1,921 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: Member System Sample!" Posted: @ 10:36 pm on Feb 01 2009    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

Hmm, the script covers that. Perhaps the code isn't executing properly. Heres where that is discussed in the article: Complete Members System: Page 5




-bs0d | AllSyntax.com

    Viewed: 1,914 Times | Reply to This | To top
  This user is offline  jbourne
  Subject: "re: Member System Sample!" Posted: @ 6:12 am on Feb 02 2009    
Member #: 840
Rank: User - (2)
Since: 02/01/09
Posts: 2

Thank you...I fixed the initial problem but now get this syntax error

"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''e3ceb5881a0 a1fdaad01296d75 54868d', 'jelbourne@cog eco.ca')' at line 3"

everything else seems to be working fine with my db_connect.php because it communicated fine with sql

here are the two sections of code used in register.php

<?php
session_start() ;
require_once(' db_connect.php ');



//Check if username already exists...

$q2 = mysql_query(&q uot;SELECT * FROM `members` WHERE 'username' = '".$_POS T['username'] ."'&quo t;
$q3 = mysql_fetch_obj ect($q2);

if($q3->user name == $_POST['userna me']) {
die('<BR> ;<BR>Sorr y, but the username "'.$q3-& gt;username.' " is taken, please choose another.');


*************** *************** *************** *********
Anything jump out at you as being wrong




    Viewed: 1,909 Times | Reply to This | To top
Viewing Page: 2 of 2


« Prev.
1 | 2 |

You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank