Jump to content

lavarock09

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by lavarock09

  1. lavarock09

    Mysql INSERT INTO

    if(isset($_POST['save']));{ $title = $_POST['title']; $content = $_POST['content']; $picture = $_POST['picture']; $query = "INSERT INTO homepage (title, content, picture)". "VALUES ('$title', '$content', '$picture')"; $result = mysql_query($query) or die('Error ,query failed'); echo "Article '$title' Added"; echo "<br /><a href='index.php'>Back to Homepage</a>";} I changed VALUE to VALUESThat should work
  2. Because he asked for a password system
  3. this is a simple login scriptlogin.htm <form action="login.php" method="post">Password: <input type="text" name="password"></form> login.php <?php$conn = mysql_connect(localhost,db userame,db password);mysql_select_db(db name) or die("Unable to select database");$password = $_POST['password'];$password2 = md5($password);/*To Be really safe you could do this */$password3 = md5($password2);/* Assuming that you have the encrypted password in the db do this */$getdbpassword = mysql_query("SELECT * FROM password");while ($row = @mysql_fetch_assoc($getdbpassword)){$pass = $row['password'];}if($pass == $password3){echo 'Successfully Logged In';}else{echo 'Login Failure. Please try again.';}/* If you don't have the encrypted password in your database, run this and put what gets outputted into a table called password in a field called password in your DB */echo $password3; Hope this makes sense
  4. lavarock09

    search problem

    I'm not certain, but you might be able to use txt files...Correct me if I'm wrong...
  5. Well...It would be good if you had a mySQL database...Then you just enter the data into the database and display it somewhere else...If you need that code, I'll give it you...
×
×
  • Create New...