Jump to content

aznkidzx

Members
  • Posts

    56
  • Joined

  • Last visited

    Never

Everything posted by aznkidzx

  1. I found a login system tutorial off YouTube.
  2. I want to learn too. Also, how do I open php.exe? I installed Wampserver and it came with it. I open php.exe and only the command prompt pops up, nothing else. Inside command prompt is nothing. How do I run it?
  3. To tell the truth, no I don't know how it works. Also in my login system code, I only find this. <?php if(!empty($_SESSION['LoggedIn']) && !empty($_SESSION['Username'])) { ?>
  4. I used the code you presented and after I logged in, the logout isn't there anymore. Even when I am not logged in it isn't there. Would you need my login code?
  5. So in my navigation menu, I put this? Wait also sorry for being stupid and useless. <ul id="navigation" name="navigation"> <li><a href="index.html">home</a></li> <li><a href="about.html">about</a></li> <li><a href="portfolio.html">portfolio</a></li> <li><a href="contact.php">contact</a></li> <li><a href="register.php">register</a></li> <li><a href="login.php">login</a></li> <?php session_start(); if ($_SESSION['is_logged_in'])) { // display data for logged in users } else { // display data for users who aren't logged in. } ?> <li><a href="logout.php">logout</a></li> </ul> -------------- I just tried that code and this is the error Parse error: syntax error, unexpected ')' in /home/a7856302/public_html/portfolio/index.html on line 29
  6. Do I have to insert the <?php and ?>
  7. I know but where do I insert that code?
  8. I have a login system and it works fine
  9. I don't. I am trying to find out how to do that as well.
  10. Okay my navigation menu, I have all these regular things. I also have Login Register and Logout. This is the code for my navigation menu. <ul id="navigation" name="navigation"> <li><a href="index.html">home</a></li> <li><a href="about.html">about</a></li> <li><a href="portfolio.html">portfolio</a></li> <li><a href="contact.php">contact</a></li> <li><a href="register.php">register</a></li> <li><a href="login.php">login</a></li> <li><a href="logout.php">logout</a></li> I want to make it so that only when people are logged in, the logout navigation is there. How do I do so?
  11. <!-- Begin function textCounter(field, countfield, maxlimit) { if (field.value.length > maxlimit) // if too long...trim it! field.value = field.value.substring(0, maxlimit); // otherwise, update 'characters left' counter else countfield.value = maxlimit - field.value.length; } // End --> </script> Place in <body> <!-- textCounter() parameters are: text field, the count field, max length --> <form name=myform action="YOUR-SCRIPT.CGI"> <font size="1" face="arial, helvetica, sans-serif"> ( You may enter up to 125 characters. )<br> //change 125 <textarea name=message wrap=physical cols=28 rows=4 onKeyDown="textCounter(this.form.message,this.form.remLen,125);" // change 125 to anything you wish onKeyUp="textCounter(this.form.message,this.form.remLen,125);"></textarea> // change to same as abovce <br> <input readonly type=text name=remLen size=3 maxlength=3 value="125"> characters left</font> // change 125 </form>
  12. Oh how about <align="center">?
  13. <form name="form1" method="post" action=""> <table width="500" border="0" align="center" cellpadding="1" cellspacing="0" bgcolor="#CCCCCC"> <tr valign="top"> <td> <table width="100%" border="0" cellspacing="0" cellpadding="4" bgcolor="#eeeeee"> <tr bgcolor="#000000"> <td width="20%" valign="top" bgcolor="#999999"><font color="#ffffff"><b><center> Login</b></font></td> </tr> <tr valign="top"> <td align="center"><b>User Name</b><br> <input name="textfield1" type="text" size="25"> <p><b>Password</b><br> <input name="textfield1" type="password" size="25"> </p> <p> <input type="submit" name="Submit" value="Sign In"> </p></td> </tr> </table></td> </tr> </table> </form> Maybe thats what your looking for?
  14. <br><embed src="sample.mov" autostart="true" width="160" height="144" loop="true">
  15. Place between <head> and </head> <!-- Begin function textCounter(field, countfield, maxlimit) { if (field.value.length > maxlimit) // if too long...trim it! field.value = field.value.substring(0, maxlimit); // otherwise, update 'characters left' counter else countfield.value = maxlimit - field.value.length; } // End --> </script> Place in <body> <!-- textCounter() parameters are: text field, the count field, max length --> <center> <form name=myform action="YOUR-SCRIPT.CGI"> <font size="1" face="arial, helvetica, sans-serif"> ( You may enter up to 125 characters. )<br> //change 125 <textarea name=message wrap=physical cols=28 rows=4 onKeyDown="textCounter(this.form.message,this.form.remLen,125);" // change 125 to anything you wish onKeyUp="textCounter(this.form.message,this.form.remLen,125);"></textarea> // change to same as abovce <br> <input readonly type=text name=remLen size=3 maxlength=3 value="125"> characters left</font> // change 125 </form> </center>
  16. OK. I need a script that'll give an error like maybe a popup or message at top of form when a field is left out. Here's the code. <?php if ($_POST["email"]<>'') { $ToEmail = 'email@domain.com'; $EmailSubject = 'Contact '; $mailheader = "From: ".$_POST["email"]."\r\n"; $mailheader .= "Reply-To: ".$_POST["email"]."\r\n"; $mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n"; $MESSAGE_BODY = "Name: ".$_POST["name"]."<br>"; $MESSAGE_BODY .= "Email: ".$_POST["email"]."<br>"; $MESSAGE_BODY .= "Comment: ".nl2br($_POST["comment"])."<br>"; mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure"); ?> Your message was successfully sent! <?php } else { ?> <form action="sendmail.php" method="post"> <table width="400" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="29%" class="bodytext"><strong>Name:</strong></td> <td width="71%"><input name="name" type="text" id="name" size="32"></td> </tr> <tr> <td class="bodytext"><strong>Email:</strong></td> <td><input name="email" type="text" id="email" size="32"></td> </tr> <tr> <td class="bodytext">Comment:</strong></td> <td><textarea name="comment" cols="45" rows="6" id="comment" class="bodytext"></textarea></td> </tr> <tr> <td class="bodytext"> </td> <td align="left" valign="top"><input type="submit" name="Submit" value="Send"></td> </tr> </table> </form> <?php }; ?>
  17. No, I didn't write it. My friend said he made it. Not real life friend.
  18. <?php if ($_POST["email"]<>'') { $ToEmail = 'redhood2009@live.com'; $EmailSubject = 'Site contact form '; $mailheader = "From: ".$_POST["email"]."\r\n"; $mailheader .= "Reply-To: ".$_POST["email"]."\r\n"; $mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n"; $MESSAGE_BODY .= "Email: ".$_POST["email"]."<br>"; $MESSAGE_BODY .= "Message: ".$_POST["message"]."<br>"; mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure"); ?> Your message to redhood2009@live.com was successfully sent! <?php } else { ?> <form action="form.php" method="post"> //change "form.php" to any other name you wish <table width="400" border="0" cellspacing="2" cellpadding="0"> <tr> <td class="bodytext">Email:</td> <td><input name="email" type="text" id="email" size="32"></td> </tr> <tr> <td class="bodytext">Message:</td> <td><textarea name="messsage" cols="45" rows="6" id="message" class="bodytext"></textarea></td> </tr> <tr> <td class="bodytext"> </td> <td align="left" valign="top"><input type="submit" name="Submit" value="Submit"></td> </tr> </table> </form> <?php }; ?> I believe that ^ works.
  19. Oh yah.. I just realized. http://test.colorev.co.cc/register.php http://test.colorev.co.cc/ But I still dont get how to add to the member's area
  20. aznkidzx

    Form Help.

    You need PHP code. I'd recommend http://www.phpjabbers.com/make-contact-form-and-send-email-in-php-php21.html . I use it for my website and it works fine
  21. I still dont know how to add to it, also the link you posted, the person didn't post a way to login to the database so therefore I can't use it yet.
  22. I could help with captcha but not login system. Create a new file called captcha.php INside should be this <?php session_start(); $text = rand(10000,99999); $_SESSION["vercode"] = $text; $height = 25; $width = 65; $image_p = imagecreate($width, $height); $black = imagecolorallocate($image_p, 0, 0, 0); $white = imagecolorallocate($image_p, 255, 255, 255); $font_size = 14; imagestring($image_p, $font_size, 5, 5, $text, $white); imagejpeg($image_p, null, 80); ?> Now paste this on the page of your webform. <?php session_start(); if ($_POST["vercode"] != $_SESSION["vercode"] OR $_SESSION["vercode"]=='') { echo '<strong>Incorrect verification code.</strong><br>'; } else { // Add form data echo '<strong>Verification successful.</strong><br>'; }; ?> ------------------------------------------------- nevermind.. I guess I can help with the login system after all.. Open MySQL server and execute this CREATE TABLE `users` ( `UserID` INT(25) NOT NULL AUTO_INCREMENT PRIMARY KEY , `Username` VARCHAR(65) NOT NULL , `Password` VARCHAR(32) NOT NULL , `EmailAddress` VARCHAR(255) NOT NULL ); Then download the rest of the files from attachment.
×
×
  • 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.