Jump to content

Lamez

Members
  • Posts

    1,686
  • Joined

  • Last visited

    Never

Everything posted by Lamez

  1. I am having tons of problems with this please help me out thanks <?php include ("config.php"); // connect to the mysql server $link = mysql_connect($server, $db_user, $db_pass) or die ("Could not connect to mysql because ".mysql_error()); // select the database mysql_select_db($database) or die ("Could not select database because ".mysql_error()); // insert the data $insert = mysql_query("insert into $table values ($_POST['email']')"); or die("Could not insert data because ".mysql_error()); // print a success message echo "E-Mail Added To Database, starting to e-mail."; echo "<meta http-equiv=Refresh content=2; URL=mailing.php>"; } ?>
  2. Is there a way I could get a script that will count how many time the page has been refreshed. I am using meta redirects, but I want to know how many times it refresh.
  3. Ok my teacher apporached me today asking me if I would help her, I said I will try. Well she asked me if I get a system to e-mail this website per minuet, I asked her why. She said that the school's band will be on a website to vote, and you can e-mail the peeps who run the website per minuet to cast your vote. So I need help here, I tried doing this in various ways, none worked so far, so I thought I will give PHP a shot, but I have no clue where to begin in PHP. So how can I create a script to e-mail a person per minuet with the body saying "Lubbock Copper High School Band". Thanks Guys
  4. Ok I set up my captcha to check to see it the code matches the image through a form action of course. Well it the code it correct it goes ahead and adds the user info into the database (its a registration form). If it is not it goes back to the registration page and says the captcha is incorrect. Well even when I type in the correct code it says I entered it wrong. Here is some of my scripts My Registration Form <?php $cryptinstall="_bin_/crypt/./cryptographp.fct.php"; include $cryptinstall; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="style/default.css"/> <title>Lamez's Corner</title> </head> <body> <div class="logo"><img src="style/img/logo.gif" alt="Lamez's Corner" /></div> <?php $current_page = "register"; include_once "style/include/menu.php"; ?> <?php $getlink = $_GET["process"]; if ($getlink == "signup") { //the registration form include ("style/include/pages/reg1.txt"); echo ("<center>"); dsp_crypt(0,1); echo ("</center>"); include ("style/include/pages/reg2.txt"); } elseif ($getlink == "cap_error") { include ("style/include/pages/err1.txt"); include ("style/include/pages/reg1.txt"); echo ("<center>"); dsp_crypt(0,1); echo ("</center>"); include ("style/include/pages/reg2.txt"); }else{ print <<<HERE <div class="ann"> <p class="center"> Welcome Soon To Be User, before sigining up you will have to provide a correct e-mail address, we do not check to make sure it is correct, we assume. We need your e-mail address incase you ever loose your password, and so we can e-mail you important updates. So please provide a correct e-mail address. </p> <p class="center">-Lamez</p> <p class="center"><a href="?process=signup">Continue!</a></p> </div> HERE; } ?> <div class="footer"> <p> Site Template & Original Site Content <br />© 2007-2008 <a href="mailto:lamez@lamezz.com">James Little</a> </p> </div> <div class="spacer"> </div> </body> </html> Reg1.txt <div class="box"> <h4>Register</h4> <form action="_bin_/crypt/check.php?<?PHP echo SID; ?>" method="post" onSubmit="style/include/js/check_form.js"> <p class="center">Note: Marked <font color="#000099">*</font> are required</p> <p class="center">Username: <font color="#000099">*</font><br /> <input type="text" name="username" size="20"> <br /> <br /> Password: <font color="#000099">*</font><br /> <input type="password" name="password" size="20" maxlength="12"> <br /> <br /> Verify Password: <font color="#000099">*</font><br /> <input type="password" name="password2" size="20" maxlenth="12"> <br /> <br /> First Name:<br /> <input type="text" name="name1" size="20"> <br /> <br /> Email: <font color="#000099">*</font><br /> <input type="text" name="email" size="20"> reg2.txt <p class="center"><br /> Security Code:<font color="#000099">*</font> <input id="security_code" name="security_code" type="text" autocomplete='off' /> <br /> <br /> <input type="submit" value="Sign Up"> </p> </form> </div> check.php <?php $cryptinstall="./cryptographp.fct.php"; include $cryptinstall; if (chk_crypt($_POST['code'])) header("Location: ../register.php"); else header("Location: ../../register.php?process=cap_error"); ?> Thanks Guys!
  5. I have never worked with JS, but is there a way where if everything is valid in the form (My HTML Form) redirect to another page? If so how?
  6. Wow never thought to do it that way, but I seriously need help mixing the JavaScript's, and by that I mean take one script and add it to the other one to make it work, but I have no experience with it at all, please help me with this.
  7. Here My Validation Script (JS) <script type="text/javascript"> function setFocus(aField) { document.forms[0][aField].focus(); } function isAnEmailAddress(aTextField) { if (document.forms[0][aTextField].value.length<5) { return false; } else if (document.forms[0][aTextField].value.indexOf("@") < 1) { return false; } else if (document.forms[0][aTextField].value.length - document.forms[0][aTextField].value.indexOf("@") < 4) { return false; } else { return true; } } function isEmpty(aTextField) { if ((document.forms[0][aTextField].value.length==0) || (document.forms[0][aTextField].value==null)) { return true; } else { return false; } } function validate() { if (isEmpty("username")) { alert("Please fill your username."); setFocus("username"); return false; } if (isEmpty("password")) { alert("Please fill in your password."); setFocus("password"); return false; } if (!isAnEmailAddress("email")) { alert("The entered email address is invalid."); setFocus("email"); return false; } return true; } </script> Here is My Password Validation (JS) <SCRIPT LANGUAGE="JavaScript"> <!-- Original: Russ Swift (rswift220@yahoo.com) --> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin function validatePwd() { var invalid = " "; // Invalid character is a space var minLength = 6; // Minimum length var pw1 = document.myForm.password.value; var pw2 = document.myForm.password2.value; // check for a value in both fields. if (pw1 == '' || pw2 == '') { alert('Please enter your password twice.'); return false; } // check for minimum length if (document.myForm.password.value.length < minLength) { alert('Your password must be at least ' + minLength + ' characters long. Try again.'); return false; } // check for spaces if (document.myForm.password.value.indexOf(invalid) > -1) { alert("Sorry, spaces are not allowed."); return false; } else { if (pw1 != pw2) { alert ("You did not enter the same new password twice. Please re-enter your password."); return false; } else { alert('Nice job.'); return true; } } } // End --> </script> Here is My Captcha (PHP) <?php if (chk_crypt($_POST['code'])) echo "<a><font color='#009700'>Correct</font></a>" ; else echo "<a><font color='#FF0000'>Incorrect</font></a>" ; ?> Any Ideas?
  8. I know, but how do I mix my 2 JavaScripts?
  9. Alright, but I am not sure on how to mix 2 javascripts and one php script. Can you help me do that?
  10. I did look at the first couple lines of the code <?php $cryptinstall="_bin_/crypt/./cryptographp.fct.php"; include $cryptinstall; ?>
  11. An image to appear its for my captcha.
  12. yea when I add it though it displays it as written, not as it was intended to do.
  13. ok I want to know how can I add a php block inside a php block? here is my code <?php $getlink = $_GET["process"]; if ($getlink == "signup") { //the registration form print <<<SU <div class="box"> <h4>Register</h4> <form action="_bin_/register.php" method="post" onSubmit="return validate()"> <p class="center">Note: Marked <font color="#000099">*</font> are required</p> <p class="center">Username: <font color="#000099">*</font><br /> <input type="text" name="username" size="20"> <br /> <br /> Password: <font color="#000099">*</font><br /> <input type="password" name="password" size="20" maxlength="12"> <br /> <br /> Verify Password: <font color="#000099">*</font><br /> <input type="password" name="password2" size="20" maxlenth="12"> <br /> <br /> First Name:<br /> <input type="text" name="name1" size="20"> <br /> <br /> Email: <font color="#000099">*</font><br /> <input type="text" name="email" size="20"> <br /> <br /> //need to add a php code here for security capatcha<br /> Security Code:<font color="#000099">*</font> <input id="security_code" name="security_code" type="text" autocomplete='off' /> <br /> <br /> <input type="submit" value="Sign Up"> </p> </form> </div> SU; }else{ print <<<HERE <div class="ann"> <p class="center"> Welcome Soon To Be User, before sigining up you will have to provide a correct e-mail address, we do not check to make sure it is correct, we assume. We need your e-mail address incase you ever loose your password, and so we can e-mail you important updates. So please provide a correct e-mail address. </p> <p class="center">-Lamez</p> <p class="center"><a href="?process=signup">Continue!</a></p> </div> HERE; } ?> I need to add this in my script <?php dsp_crypt(0,1); ?> where I commented the line about adding a php code. any ideas? Was I clear enough?
  14. try using center tags <center></center> that is all I got.
  15. I was wanting to know how can I make more than one form action? In my form I need a captcha action, a validate form action(it makes sure the forms are filed in), and a verify password action
  16. Wow this perfect, now I can only have one menu.php and edit one page when I want to do something! Thanks!
  17. Ok I post yesterday about my menu.php I only want to edit one page when I add a menu item or when I move a page. Ok so I asked if I could do a include like this menu.php?page=index because I added a selection code to my css so my menu would like this (in HTML) <div class="menu"> <ul> <li class="selected"><a href="index.php">Home</a></li> [b]<-Selected: Indicates the user is on this page[/b] <li class="nonselected"><a href="_login/_members/members.php">Members</a></li> [b]<-Not Selected: Indicates the user is not on the page[/b] <li class="nonselected"><a href="login.php">Login</a></li> <li class="nonselected"><a href="register.php">Register</a></li> <li class="nonselected"><a href="info/info.php">Info</a></li> </ul> </div> Well I got an error in my include when I did that So someone gave me this code <div class="menu"> <ul> <li class="<?php echo ($_SERVER['PHP_SELF'] == 'index.php') ? 'selected' : 'nonselected'; ?>"><a href="index.php">Home</a></li> <li class="<?php echo ($_SERVER['PHP_SELF'] == 'members.php') ? 'selected' : 'nonselected'; ?>"><a href="_login/_members/members.php">Members</a></li> <li class="<?php echo ($_SERVER['PHP_SELF'] == 'login.php') ? 'selected' : 'nonselected'; ?>"><a href="login.php">Login</a></li> <li class="<?php echo ($_SERVER['PHP_SELF'] == 'register.php') ? 'selected' : 'nonselected'; ?>"><a href="register.php">Register</a></li> <li class="<?php echo ($_SERVER['PHP_SELF'] == 'info.php') ? 'selected' : 'nonselected'; ?>"><a href="info/info.php">Info</a> </ul> </div> Well it did not work, at all Any Ideas? Was I clear enough?
  18. You got them mixed up Thanks Though here is what I changed <div class="menu"> <ul> <li class="<?php echo ($_SERVER['PHP_SELF'] == 'index.php') ? 'nonselected' : 'selected'; ?>"><a href="index.php">Home</a></li> <li class="<?php echo ($_SERVER['PHP_SELF'] == 'members.php') ? 'nonselected' : 'selected'; ?>"><a href="_login/_members/members.php">Members</a></li> <li class="<?php echo ($_SERVER['PHP_SELF'] == 'login.php') ? 'nonselected' : 'selected'; ?>"><a href="login.php">Login</a></li> <li class="<?php echo ($_SERVER['PHP_SELF'] == 'register.php') ? 'nonselected' : 'selected'; ?>"><a href="register.php">Register</a></li> <li class="<?php echo ($_SERVER['PHP_SELF'] == 'info.php') ? 'nonselected' : 'selected'; ?>"><a href="info/info.php">Info</a> </ul> </div>
  19. I want to include my menu on each page. My menu tells you what page you are on by using a selection code I added to my CSS. Instead of havening separate menu codes on each page I want to have them on all one page in case I add a menu item or move a page, I can just edit one page. So I tried to do this in my menu.php <?php $getlink = $_GET["page"]; if ($getlink == "index") { print <<<IND <div class="menu"> <ul> <li class="selected"><a href="index.php">Home</a></li> <li class="nonselected"><a href="_login/_members/members.php">Members</a></li> <li class="nonselected"><a href="login.php">Login</a></li> <li class="nonselected"><a href="register.php">Register</a></li> <li class="nonselected"><a href="info/info.php">Info</a> </ul> </div> IND; } elseif ($getlink == "login") { print <<<LOG <div class="menu"> <ul> <li class="nonselected"><a href="index.php">Home</a></li> <li class="nonselected"><a href="_login/_members/members.php">Members</a></li> <li class="selected"><a href="login.php">Login</a></li> <li class="nonselected"><a href="register.php">Register</a></li> <li class="nonselected"><a href="info/info.php">Info</a> </ul> </div> LOG; } elseif ($getlink == "register") { print <<<LOG <div class="menu"> <ul> <li class="nonselected"><a href="index.php">Home</a></li> <li class="nonselected"><a href="_login/_members/members.php">Members</a></li> <li class="nonselected"><a href="login.php">Login</a></li> <li class="selected"><a href="register.php">Register</a></li> <li class="nonselected"><a href="info/info.php">Info</a> </ul> </div> LOG; } else { echo "Menu?"; } ?> So in my index.php I would put <?PHP include ("menu.php?page=index"); ?> or instead of index I would put login, and so on. Well I get this error How should I go about this? What am I doing Wrong? BTW I know I am missing Tags in my menu.php
  20. I do not know, but now my in box is getting spamed from some one trying to hack it
  21. Never mind I got it to work, but you guys can have a look at it anyway
  22. I entered a URL, then click on my title, and got a 403! How does this work?
×
×
  • 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.