Jump to content

solidrichard

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

solidrichard's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks ... My problem is I use $hash to check if the password and password in db for that user matching . But it doesnt working :/
  2. Hi, I my first problem is hashing passwords to md5. My second problem is defining session on value from db. There is my code but not working. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $username=$_POST['username']; $password=$_POST['password']; $hash = md5($password); $username = stripslashes($username); $password = stripslashes($password); $username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password); $sql="SELECT * FROM $tbl_name WHERE where username = '$username' and password = '$hash'"; $result=mysql_query($sql); $count=mysql_num_rows($result); if($count==1){ $sql2="SELECT access FROM $tbl_name WHERE username='$username' and password='$password'"; $access=mysql_query("$sql2"); session_register("username"); session_register("password"); session_register("access"); $_SESSION["access"]=$access; header("location:success.php"); } else { echo "Invalid Username or Password"; Thanks for any answers.
  3. hi , I have drop down box $sql= "select * from table where nabor='1'" ; $vysledek=mysql_query($sql); $moznosti=""; while ($row=mysql_fetch_array($vysledek)) { $id=$row["id"]; $projekt=$row["projekt"]; $moznosti.="<OPTION VALUE=\"$id\">".$projekt; <SELECT NAME=projekt> <OPTION VALUE=0>Vyberte <?=$moznosti?> </SELECT> And I want if someone select project with for example id=5 link to another website... Thanks for any answers
×
×
  • Create New...

Important Information

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.