Jump to content

Panta

Members
  • Content Count

    115
  • Joined

  • Last visited

Everything posted by Panta

  1. Panta

    Login Count

    friends please i need you to look into my script .what i need is a script that will count a user as the user logs in.And when the user logs in 3 times to the site he will not be able to log in again. The script <?session_start();session_destroy();?><table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"><tr><form name="form1" method="post" action="checklogin.php"><td><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"><tr><td colspan="3"><strong>Member Login </strong>
  2. Panta

    My Login Script

    THANKS , THE PROBLEM IS THAT I DIDN'T CHOICE THE CORRECT DATABASE NAME.IS NOW WORKING PERFECTELY.
  3. Panta

    My Login Script

    i have done that. but could not see any erro. this is my config.php<?php $dbhost = 'localhost'; $dbname = 'school'; $dbusername = '*****'; $dbuserpass = '******'; mysql_connect ($dbhost, $dbusername, $dbuserpass);mysql_select_db($dbname) or die('Cannot select database');?>
  4. Panta

    My Login Script

    Please help me out <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Register!</title></head><body><form action='register.php' method='POST'>Username: <input type='text' name='username'><br>Password: <input type='password' name='password'><br><input name="register" type="submit" value="Submit"></form><?phpinclude('config.php');///variables...$submit=$_POST['register'];$username = mysql_real_escape_string(strip_tags(htmlspecialchars($_POST['username'])));$password = md5($_POST
  5. Panta

    Login Script

    please my friends this has been my problem. this time what the erro message is "Parse error: syntax error, unexpected $end in C:\wamp\www\newform\register2.php on line 47"This is the code...please i need ur help. Thanks <?php// Connects to your Databasemysql_connect("localhost", "user", "lpw") or die(mysql_error());mysql_select_db("Database_Name") or die(mysql_error());//This code runs if the form has been submittedif (isset($_POST['submit'])) {//This makes sure they did not leave any fields blankif (!$_POST['username'] | !$_POST['pass'] | !$_POST['pass2'] ) {die('You did not complete all
  6. Panta

    Login Script

    please i dont know the problem with this login script. the error message is Fatal error: Call to undefined function msql_query() in C:\wamp\www\newform\login.php on line 33 //connect to the mysql database server.mysql_connect ($dbhost, $dbusername, $dbuserpass);mysql_select_db($dbname) or die('Cannot select database');$page_mode = isset($_POST['page_mode']) ? $_POST['page_mode'] : '';$error_string = '';if ($page_mode == 'login'){ $email = $_POST['email']; $password = $_POST['password']; if (trim($email) == '' || trim($password) == '') { $error_string .= 'Please enter your email addres
  7. I have corrected the problem.Thanks
  8. // connect to the mysql database server.mysql_connect ($dbhost, $dbusername, $dbuserpass);mysql_select_db($dbname) or die("Cannot select database");//Are they just getting here or submitting their info?if (isset($_POST["username"])) {$username = $_POST["username"];$password = $_POST["password"];$cpassword = $_POST["cpassword"];$email = $_POST["email"];//Was a field left blank?if($username==NULL|$password==NULL|$cpassword==NULL|$email==NULL) {echo "A field was left blank.";}else{//Do the passwords match?if($password!=$cpassword) {echo "Passwords do not match";}else{//Has the username or email b
  9. yes i have both in my data base, so i need help on how to display the image so that thet user will see it on the browser
  10. please i need to know how to write a script that will change the content of Department on selection of Faculty.What i mean is maybe on selection of Sciences from Faculty, the content of Department will change to Science Departments. <form>Department:<select><option>Mechanical</option><option>Chemical</option><option>Civil</option></select><br>Faculty:<select><option>Engineering</option><option>Sciences</option><option>Law</option></select></form>
  11. please i need to know how to write a script that will change the content of Department on selection of Faculty.What i mean is maybe on selection of Sciences from Faculty, the content of Department will change to Science Departments. <form>Department:<select><option>Mechanical</option><option>Chemical</option><option>Civil</option></select><br>Faculty:<select><option>Engineering</option><option>Sciences</option><option>Law</option></select></form>
  12. Please friends please help me on how to display a picture that is in the data base on a browser, so that the user can see his uploded picture, and if possible print. thanks
  13. THE PROBLEM IS THAT THE SCRIPT IS NOT CORRECT. I DONT KNOW WHERE THE PROBLEM IS FROM, THE MORE I TRIED TO CORRCT IT THE MORE ERROR I SEE
  14. Please nice friends i have been trying to write a script that will upload pix to database and also pull it out to the browser, But i have been having problem with my code, Plz help me out. This is the code. Thanks <?php$db = mysql_connect("localhost","Austin","password");mysql_select_db("school");$pname = $_REQUEST['pname'];$pdesc = $_REQUEST['pdesc'];$ftype = $_FILES['pfile']['type'];$fname = $_FILES['pfile']['name'];if ($_FILES['pfile']['size'] <= $_REQUEST['MAX_FILE_SIZE']){$fdata = fread(fopen($_FILES['pfile']['tmp_name'], "rb"),$_FILES['pfile']['size']);$fdata = base64_encode($fda
×
×
  • Create New...