Two in one

Post here is you are having problems with any of the tutorials.
Post Reply
gosponTarik
Posts: 8
Joined: Thu Jul 14, 2011 5:54 pm

Two in one

Post by gosponTarik »

Hello everyone,

I complete User Profile (with avatar) and System Registration (with cookies and email validation) tutorials. Now I was wondering how can I make one just one system, so users can register, get email validation code, connect to their profile?

Hope you'll understand what a wrote up there :)
User avatar
jacek
Site Admin
Posts: 3262
Joined: Thu May 05, 2011 1:45 pm
Location: UK
Contact:

Re: Two in one

Post by jacek »

Well the idea is that you can use the stuff from those tutorials to make one completely new system that would contain all of the things.

So I guess just have a go, and see where you get stuck.
Image
gosponTarik
Posts: 8
Joined: Thu Jul 14, 2011 5:54 pm

Re: Two in one

Post by gosponTarik »

Curenty I'am working on registration. Hope there wont be problems 8-)
gosponTarik
Posts: 8
Joined: Thu Jul 14, 2011 5:54 pm

Re: Two in one

Post by gosponTarik »

OK, now I'm stuck, i just add some new registratio fields, write them to user.ini.php file and when I fill form a got totaly wrong iformations in my db. Only Username and email are on right place, all other is mixed.
mysql_query("INSERT INTO `users` (`user_username`, `user_password`, `user_email`, `user_firstname`, `user_lastname`, `user_location`) VALUES ('{$user}', '{$pass}', '{$email}', '{$firstname}', '{$lastname}',  '{$location}')");
I test this in phpmyadmin and show no errors.

This is form in register.php
<form action="" method="post">
<p>
<label for="username">Username:</label>
<input type="text" name="username" id="username" value="<?php if (isset($_POST['username'])) echo htmlentities($_POST['username']); ?>" />
</p>
<p>
<label for="email">Email:</label>
<input type="text" name="email" id="email" value="<?php if (isset($_POST['email'])) echo htmlentities($_POST['email']); ?>" />
</p>
<p>
<label for="firstname">Firstname:</label>
<input type="text" name="firstname" id="firstname" value="<?php if (isset($_POST['firstname'])) echo htmlentities($_POST['firstname']); ?>" />
</p>
<p>
<label for="lastname">Lastname:</label>
<input type="text" name="lastname" id="lastname" value="<?php if (isset($_POST['lastname'])) echo htmlentities($_POST['lastname']); ?>" />
</p>
<p>
<label for="email">Location:</label>
<input type="text" name="location" id="location" value= "<?php if (isset($_POST['location'])) echo htmlentities($_POST['location']); ?>" />
</p>
<p>
<label for="password">Password:</label>
<input type="password" name="password" id="password" />
</p>
<p>
<label for="repeat_password">Repeat Password:</label>
<input type="password" name="repeat_password" id="repeat_password" />
</p>
<p>
<input type="submit" value="register" />
</p>
</form>
Can someone help me with this one?

EDIT: And it never write something to the Firstname, this might be biggest problem.[/]

FIXED
User avatar
kalipsso
Posts: 30
Joined: Thu Jun 09, 2011 3:03 pm
Location: Bucharest
Contact:

Re: Two in one

Post by kalipsso »

i already did that.. :)
User avatar
Linkjuice57
Posts: 23
Joined: Tue Jul 12, 2011 2:44 pm

Re: Two in one

Post by Linkjuice57 »

Care to explain how you fixed it? I'm curious :D
non-existent PHP newb
Post Reply