Jump to content

johnnyblaze9

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

johnnyblaze9's Achievements

Member

Member (2/5)

0

Reputation

  1. all I have is the database ....I've found all sorts of registration code and contact code, but nothing that shows me how to create a profile update form
  2. I am trying to create an update profile page where the user fills out a form that changes the database but Im a noob so I cant figure out how to do it...can anybody help?
  3. I just need to make sure if someone leaves the page open it will log itself off....is there a way to log people out if they close the page too?
  4. How do I create a timeout code? Is it a default amount of time or can it be changed?
  5. Can someone tell me what I have wrong in this password change code? I have these on 2 different pages...might that be the problem? //passwordchange.php is first <?php echo "<form action='passwordchk.php' method=post><input type=hidden name=todo value=change-password> <table border='0' cellspacing='0' cellpadding='0' align=center> <tr bgcolor='#f1f1f1' > <td colspan='2' align='center'><font face='verdana, arial, helvetica' size='2' align='center'> <b>Change Password</b> </font></td> </tr> <tr bgcolor='#ffffff' > <td ><font face='verdana, arial, helvetica' size='2' align='center'> New Password </font></td> <td align='center'><font face='verdana, arial, helvetica' size='2' > <input type ='password' class='bginput' name='password' ></font></td></tr> <tr bgcolor='#f1f1f1' > <td ><font face='verdana, arial, helvetica' size='2' align='center'> Re-enter New Password </font></td> <td align='center'><font face='verdana, arial, helvetica' size='2' > <input type ='password' class='bginput' name='password2' ></font></td></tr> <tr bgcolor='#ffffff' > <td colspan=2 align=center><input type=submit value='Change Password'><input type=reset value=Reset></font></td></tr> "; echo "</table>"; echo "<center><font face='Verdana' size='2' ><br>Click <a href=logout.php>here to logout for better security</font></center>"; ?> //passwordchk.php is below <? if(isset($todo) and $todo=="change-password"){ $password=mysql_real_escape_string($password); $status = "OK"; $msg=""; if ( strlen($password) < 3 or strlen($password) > 8 ){ $msg=$msg."Password must be more than 3 char legth and maximum 8 char lenght<BR>"; $status= "NOTOK";} if ( $password <> $password2 ){ $msg=$msg."Both passwords are not matching<BR>"; $status= "NOTOK";} if($status<>"OK"){ echo "<font face='Verdana' size='2' color=red>$msg</font><br><center><input type='button' value='Retry' onClick='history.go(-1)'></center>"; }else{ if(mysql_query("update Contact set Password='$password' where ContactID='$session[ContactID]'")){ echo "<font face='Verdana' size='2' ><center>Thanks <br> Your password changed successfully. Please keep changing your password for better security</font></center>"; } } } echo "<center><font face='Verdana' size='2' ><br><br>Click <a href=logout.php>here to logout</a> | <a href=change-password.php>Change Password</a><br></center></font>"; ?>
  6. How can I set up a change password page?
  7. How do I check if a user is logged in before allowing them to view my site and if they are not reject them?
  8. Yes I have..is there something I am leaving out?
  9. I'm using the following code to display user specific photos from a sql database, but it only diplays the file name of the pic and I can't figure out why...can anybody help? $resultsPhotos = mysql_query("SELECT FileName, Description, Created, Variety, YearPlanted, Finca, FieldName FROM vwContactPhoto where ContactID ='{$_SESSION['ContactID']}'") or die(mysql_error()); while($valuesPhotos = mysql_fetch_array($resultsPhotos)) { echo "<img src='trees/" . $valuesPhotos['FileName'] . "'>"; echo '<br /><br />';
  10. I've been trying to retrieve user specific pics from a sql database, and have been given some good advice already, but I can't seem to figure out how to display a picture that I have in a database. When a client logs into my website, I need pictures of his product to be displayed on the page. How do I run a query and then display those results if they are images?
  11. I got that part, but I'm not sure how to display it...
  12. How can I use my sql database to show user specific pics (John Doe logs in and pictures of his product show on screen)
  13. How do I create a table in html using my sql database and php?
  14. Can someone tell me how to generate user specific querys? What I mean is: When John Doe logs in I would like the next page to display information from my database specific to only him...and so on for other clients.
×
×
  • 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.