|
#1
|
||||
|
||||
|
Hi,
Im trying to create a membership system for my website however the register page does not display the form when viewed in a browser , here is my code below..Database Entry: Code:
CREATE TABLE `user_system` ( `id` INT( 11 ) NOT NULL AUTO_INCREMENT, `username` VARCHAR( 250 ) NOT NULL , `password` VARCHAR( 250 ) NOT NULL , `email` VARCHAR( 250 ) NOT NULL , `is_activated` TINYINT( 1 ) NOT NULL DEFAULT '0', `activation_code` VARCHAR( 25 ) NOT NULL , PRIMARY KEY ( `id` ) ) ENGINE = MyISAM PHP Code:
PHP Code:
|
|
#2
|
||||
|
||||
|
How are you loading it?
You have it setup so that you need the querystring to make the form show ?action=new Also, with that amount of HTML I would suggest that you break in and out of HTML & PHP instead of using HTML within PHP strings.
__________________
Cheers, Degs Please post back with your results CTH Terms of Use CTH Subscriptions :: Adaware Guide :: HijackThis |
|
#3
|
||||
|
||||
|
Not sure what you mean by how you loading it, sorry im a php noob
Im running it through Apache if thats any help Is there anyway of making it display, do i have to remove the ?action=new ?...
|
|
#4
|
||||
|
||||
|
If you load your page using
http://domain.com/register.php then it will be blank because you have set the switch to look for a querystring variable. http://domain.com/register.php?action=new will display your form.
__________________
Cheers, Degs Please post back with your results CTH Terms of Use CTH Subscriptions :: Adaware Guide :: HijackThis |
|
#5
|
||||
|
||||
|
aha i got you
its working now, ill try and make it move in between html and php to reduce the amount of html contained within the php code, thanks degsy
|
|
#6
|
||||
|
||||
|
ahhhh
im now trying to add an activation case underneath the last line removing the last } of the previous code and adding on the below:PHP Code:
Parse error: parse error, unexpected $ in /home/fhlinux191/d/domain.co.uk/user/htdocs/members/register.php on line 153 Line 153 is the ?> closing code of php and theirs no $ symbol there, any ideas
|
|
#7
|
||||
|
||||
|
please post the full script
__________________
Cheers, Degs Please post back with your results CTH Terms of Use CTH Subscriptions :: Adaware Guide :: HijackThis |
|
#8
|
||||
|
||||
|
Check the line above (line 152) often it's a missing ; or ) that causes the error. Also need a break attribute in the php if you are using a switch case.
Also you may want to add standard html structure to the page such as a DOCTYPE tag, head tag, title tag etc.
__________________
Scott Moderator : Macintosh : Website & Graphics Adobe Certified Expert: Illustrator Royalty-Free Vector Stock Art |
|
#9
|
||||
|
||||
|
Quote:
What Im trying to accomplish is to test run a membership system where users can register and create/edit their profile on my site. Then after success modify it so it integrates with my site. ![]() Ive come across yet another problem which is baffling me (probably due to my own lack of php/mysql ) I have created a log on script and a view profile script, when a user logs in they get the message You have been successfully logged in! however I would also like to link a view their profile link to the registered database id, but I cant get it to work all i get returned is There was no member ID to view a profile for and the link returnshttp://www.mysite.com/members/view_p...php?member_id= ...missing the database id of the logged in user at the end of the url here is my code for the two pages: login.php PHP Code:
PHP Code:
Last edited by karlosio; September 4th, 2006 at 12:20 AM. |
|
#10
|
||||
|
||||
|
PHP Code:
In short, you need to pull the number from the id field in the log in query in order to pass it to a link.
__________________
Scott Moderator : Macintosh : Website & Graphics Adobe Certified Expert: Illustrator Royalty-Free Vector Stock Art |
![]() |
| Bookmarks |
«
Previous Topic
|
Next Topic
»
| Topic Tools | |
|
|
All times are GMT +1. The time now is 01:05 PM.
[
RSS ]



, here is my code below..
Im running it through Apache if thats any help
im now trying to add an activation case underneath the last line removing the last } of the previous code and adding on the below:

) I have created a log on script and a view profile script, when a user logs in they get the message You have been successfully logged in! however I would also like to link a view their profile link to the registered database id, but I cant get it to work




