
sstangle73
Members-
Posts
288 -
Joined
-
Last visited
Everything posted by sstangle73
-
my script is sooooo slow anyone know a way to optimize it? <?php error_reporting(E_ALL); if(isset($_POST['sendemail'])){ $pass = $_POST['password']; if($pass == 'Shenentaha'){ $to = $_POST['emailto']; $subject = stripslashes($_POST['subject']); $amessage = nl2br($_POST['emailbody']); $message = stripslashes($amessage); $from = $_POST['from']; $reply = $_POST['reply']; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: ' . $from . "\r\n"; $headers .= 'Reply-to: ' . $reply . "\r\n"; $ex = explode(",",$to); if(count($ex) > 0){ foreach($ex AS $emails){ $email = trim($emails); mail($email,$subject,$message,$headers); } }else { mail($email,$subject,$message,$headers); } echo "Success<br><br><br><hr><br><br><br>New Email:"; } else { echo "Wrong Password. Contact Steven"; } } ?> <form action="<? echo $HTTP_SERVER_VARS['PHP_SELF']; ?>" method="post"> <table> <tr><td> <textarea name="emailto" rows="15" cols="50">[email protected], [email protected], [email protected]</textarea> </td></tr> <tr><td> <input type="text" name="subject" size="67" maxlength="100" value="subject"> </td></tr> <tr><td> <textarea name="emailbody" rows="15" cols="50">Message Here</textarea> </td></tr> <tr><td> <input type="text" name="from" maxlength="100" size="67" value="From Name: Name <[email protected]>"> </td></tr> <tr><td> <input type="text" name="reply" maxlength="100" size="67" value="Reply To: [email protected]"> </td></tr> <tr><td>Enter Password:</td></tr><tr><td> <input type="text" name="password" maxlength="50" size="67" value="Password"> </td></tr> <tr><td> <input type="submit" name="sendemail" value="Send!"> </td></tr> </table> </form>
-
how to fix: Notice: Undefined index: page in /homepages/27/d193007783/htdocs/stangle/airborne/index.php on line 33 this showes up several times once i turn error_reporting(E_ALL); this line mentioned is if($_GET['page']=="COD4"){
-
yeah that worked thanks
-
so your saying when i add it do another colome RANK#
-
there just military ranks i already have stuff in the db im wondering how to display it in a query.
-
im assumeing your tables are set up correctly right>? also change the table on the code i gave you from abn to what ever i use i forgot sorry.
-
any errors or it just doesnt? try this: <?php /*Connect, and define user*/ include ("../../style/include/session.php"); error_reporting(E_ALL); /*Define Variables*/ $region = $_POST['region1']; $a1 = $_POST['1a']; $a2 = $_POST['2a']; $a3 = $_POST['3a']; $a4 = $_POST['4a']; $a5 = $_POST['5a']; $a6 = $_POST['6a']; $a7 = $_POST['7a']; $a8 = $_POST['8a']; $a9 = $_POST['9a']; $a10 = $_POST['10a']; $a11 = $_POST['11a']; $a12 = $_POST['12a']; $a13 = $_POST['13a']; $a14 = $_POST['14a']; $a15 = $_POST['15a']; $a16 = $_POST['16a']; /*Add to DB*/ function add($region, $a1, $a2, $a3, $a4, $a5, $a6, $a7, $a8, $a9, $a10, $a11, $a12, $a13, $a14, $a15, $a16){ $q = "INSERT INTO abn VALUES ('$region', '$a1', '$a2', '$a3', '$a4', '$a5', '$a6', '$a7', '$a8', '$a9', '$a10', '$a11', '$a12', '$a13', '$a14', '$a15, '$a16')"; if ($result = mysql_query($q)) { return $result; } else { die(mysql_error() . "<br />" . $q); } } add($region, $a1, $a2, $a3, $a4, $a5, $a6, $a7, $a8, $a9, $a10, $a11, $a12, $a13, $a14, $a15, $a16); echo $region; ?>
-
there is no question what is the problem with the script i belive that you cant have spaces in a sql field ill double check tho space seemed to work fine when i added the field whats the error your getting?
-
is there a way to order a sql query by COL--LTC--CPT--1LT--SGT
-
heh the slashes were the problem i needed to strip them before it sent it. thanks
-
no ill do that. but when i send it with out "s ie: <img src=blah> it will send so its somethign with the quotes.
-
the image isnt displayed its just a blank email
-
i figured it out it was always saying fail. so it ended up being that his pw field in his db was only 20 char long so the md5 was getting cut off so the new md5 and the db one didnt match
-
set the post data to be something other then $password like try it as $userpass dont forget to change if($password == $dbpassword){ to if($userpass == $dbpassword){
-
heh that wasnt a final code i ment for you to adapt that haha but so it working now?
-
scratch that i dont think im doign that right anyway. haha try doing a sql query to get the data that relates to the username <?php $query="SELECT * FROM users WHERE username = '$username' LIMIT 1"; $result=mysql_query($query); while($array=mysql_fetch_assoc($result)){ $dbpassword = $array['password'] } if($password == $dbpassword){ continue } else { bla bla bla ?>
-
having problem in redirecting URL through .htaccess
sstangle73 replied to dani_syed's topic in PHP Coding Help
modrewrite have fun! http://www.mod-rewrite-wizard.com/ -
try this: $sql = "SELECT * FROM users WHERE username='$username' AND password='$password'"; if ($r = mysql_query ($sql)) { $row = mysql_fetch_array ($r); $num = mysql_num_rows ($r); if ($num > 0) { // if there is a row with that username/password, the user exists // Now we can assign some SESSIONS, so we can verify on later pages that the user is "logged in" $_SESSION['users_id'] = $row['users_id']; $_SESSION['username'] = $row['username']; $_SESSION['loggedin'] = TRUE; // This is where we will check to see if the user is logged in header("Location:home.php"); exit; } else { die(mysql_error()); }
-
u get any errors? error_reporting(E_ALL); and put in the else and comment out the other lines just to see whats happening. die(mysql_error());
-
you mean streaming video? you see what the camera sees when the camera sees it?
-
fixed spam problem the only problem left is the <img src="blah"> the "s will mess it up any fixes?
-
allright i found where the dots were coming from does anyone know why it gets flagged as spam? and also how do i send a html message with <img src"blah"> because "s mess up the script <?php error_reporting(E_ALL); if(isset($_POST['email'])){ $to = $_POST['emailto']; $subject = $_POST['subject']; $amessage = nl2br($_POST['emailbody']); $message = addslashes($amessage); $from = $_POST['from']; $reply = $_POST['reply']; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: ' . $from . "\r\n"; $headers .= 'Reply-to: ' . $reply . "\r\n"; $ex = explode(";",$to); if(count($ex) > 0){ foreach($ex AS $emails){ $email = trim($emails); mail($email,$subject,$message,$headers); } }else { mail($email,$subject,$message,$headers); } echo "Success"; } else { ?> <form action="<? echo $HTTP_SERVER_VARS['PHP_SELF']; ?>" method="post"> <table> <tr><td> <textarea name="emailto" rows="15" cols="50">[email protected]; [email protected]; [email protected]</textarea> </td></tr> <tr><td> <input type="text" name="subject" maxlength="100" value="subject"> </td></tr> <tr><td> <textarea name="emailbody" rows="15" cols="50">Message Here</textarea> </td></tr> <tr><td> <input type="text" name="from" maxlength="100" value="From Name"> </td></tr> <tr><td> <input type="text" name="reply" maxlength="100" value="Reply To"> </td></tr> <tr><td> <input type="submit" name="email" value="Send!"> </td></tr> </table> </form> <?php } ?>