Search found 7 matches
- Fri Nov 11, 2011 4:41 am
- Forum: PHP
- Topic: Login system and user profile
- Replies: 8
- Views: 1545
Re: Login system and user profile
[syntax=php] header('Refresh: 0; url=profile.php'); $_SESSION['username']=$username; [/syntax] you have this in line 29 or 30 when the php start the header will be start first the the header function work it going to cancel anything bellow {I think like that } better 2 user meta refresh {html} bette...
Re: User id
jacek wrote:That idea is exactly right, but there code has a few problems. There is no need for a while loop when only selecting one row, and that query should really go in a function.
yes i know but is better of show the data
Re: User id
[syntax=php] <?php session_start(); $sql="SELECT username,password FROM users WHERE username='userfrom post' AND password='password from post '"; while($user=mysql_fetch_assoc($sql)){ $id=$user['id']; $username=$user['username']; $password=$user['password']; } if($username = $_POST['user']...
Re: User id
hi
you can make it
hen the user is login and he is logined do like this
when your code are checked if that was login or not
save the user id in session =)
that is the best way
=)
you can make it
hen the user is login and he is logined do like this
when your code are checked if that was login or not
save the user id in session =)
that is the best way
=)
- Mon May 16, 2011 8:15 pm
- Forum: Tutorials
- Topic: How to Secure IDs For a MySQL Query
- Replies: 6
- Views: 2896
Re: How to Secure IDs For a MySQL Query
I agree with him, using (int) is a lot simplier yet just as effective, although your method is just as good. I use (int) in most cases as it's easy, simple, and effective (repeating myself ftw!). int is the best, the web host I use has a older version of PHP and doesn't support php_round_half_down,...
- Mon May 16, 2011 8:13 pm
- Forum: Tutorials
- Topic: How to Secure IDs For a MySQL Query
- Replies: 6
- Views: 2896
Re: how to securty primerkey
thanks for contributing this, Slight problem though if [syntax=php]if(is_int($page)){[/syntax] is true, it means that there cant be a + or - in the variable, doesn’t it either way, another effective method would be to do [syntax=php]$id = (int)$_GET['id'];[/syntax] thanks for your post and it's nic...
- Mon May 16, 2011 7:39 pm
- Forum: Tutorials
- Topic: How to Secure IDs For a MySQL Query
- Replies: 6
- Views: 2896
How to Secure IDs For a MySQL Query
hi. how are you there this is my first tutorail in this website. les get start; we know the id is primerkey we use in database table to count or to make in order imagen that you want to make a blog and the url is will be like this [syntax=php] localhost/blog/index.php?topicid=number like 1 in exampl...