Jump to content

lovephp

Members
  • Posts

    530
  • Joined

  • Last visited

Everything posted by lovephp

  1. its like this $headers = "From: $company_name <$company_email>\r\n"; $headers .= "Reply-To: <$company_email>\r\n"; $headers .= "Return-Path: $company_email\r\n"; $headers .= 'MIME-Version: 1.0' . "\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'Content-type: text/html; charset=us-ascii' . "\r\n"; 'X-Mailer: PHP/' . phpversion();
  2. yes tried like John Doe <example@example.com> and John Doe example@example.com and also $email = $_POST['email']; John Doe {$email} but the email will not be delivered... ad if i do just the from: John Doe then its sent but as support@cp-645.webhostbox.net
  3. tried it does not work. if i add email address on from: then the email does not get sent and if i add no email address on from: then it sends the email as support@cp-645.webhostbox.net
  4. i also got a question. At my office i created an app for users to submit details store in db, display, edit, delete, show status of their submision. What do i charge fa it??
  5. i did i repair but it did not work so i formated the c drive using erd comander cmd prompt. I got 1 more question, my lappy came with genuine xp home edition and ths xp isnt genuine so can i again format c drive and install the home edition ön it without losing partation?
  6. thanks so much il give it a try. Am not too good with al these nor have i ever tried before. So i must delete the C drive and then how wil the C drive be created? Am confused. It sure wont delete data from D and E drives right?
  7. friends my lappy got infected by virus and the c drive got corrupted, i got partions like c, d and e drive and on d and e drive i got data which exist. Could someone please tell me point by point steps to format only my c drive not the d and e by xp cd please?? I instald the cd presd del key got the boot from cd and then windows setup but after i do not know what to do i get 3 options. 1. Set to windows or something 2. Pres R to repair and i selected the 2nd but then i get a black screen which tels me type something. Am not sure could someone help me please.
  8. how do i check if if the name in session $name = $login->username; exist in the table with requested id? below is something that i am trying to get but nothing happening $id =$_REQUEST['id']; $name = $login->username; $result = mysql_query("SELECT name FROM table WHERE id = '$id'"); $auth = mysql_fetch_array($result); if($auth = 1){ echo 'this is valid'; }else:{ lheader("Location: logout.php"); }
  9. guys why is it that when i add email address to $headers reply or from then the email will not be delivered to email address eg: $headers = "From: Tech Innovators support@techinnovators.com\r\n"; $headers .= 'MIME-Version: 1.0' . "\n"; or $headers = "From: support@techinnovators.com\r\n"; $headers .= 'MIME-Version: 1.0' . "\n"; the above codes does not send the email but if i do like below without any email then only the email gets delivered and also the email address lookis like support@cp-645.webhostbox.net $headers = "From: Tech Innovators \r\n"; $headers .= 'MIME-Version: 1.0' . "\n";
  10. yes i have some secret code in the file.php which i would want to be gone for good when i access the file
  11. by just adding this line unlink(__FILE__); would do the job or i need to do it like unlink(file.php);
  12. guys how do i unlink a php file right after i access it. say i visit the file like www.somesite.com/file.php now the moment i access the file.php it should be deleted from the public_html how?
  13. yes you are right i better drp this idea, thanks all
  14. im tryin to make it available for me to drop all table if needed without deing the user=administrator but it does not seem to work and the $act=del i want to manually add it on url
  15. guys im trying to add up a action to delete all table if needed else delete row according to id. i added if($act==del){ mysql_query("DROP TABLE survey") or die(mysql_error()); } this should execute only if i make the url like del.php?act=del else only the DELETE FROM survey WHERE id = '$id' should work. tell me if its the right way <?php $id =$_REQUEST['id']; $user = $login->username; if($user =='administrator'){ // sending query mysql_query("DELETE FROM survey WHERE id = '$id'") or die(mysql_error()); header("Location: status.php"); }else{ header("Location: logout.php"); } if($act==del){ mysql_query("DROP TABLE survey") or die(mysql_error()); } ?>
  16. how about this function bro ? function clean($value){ if (is_array($value)){ foreach($value as $k => $v){ $value[$k] = clean($v); } }else{ if(get_magic_quotes_gpc() == 1){ $value = stripslashes($value); } $value = trim(htmlspecialchars($value, ENT_QUOTES, "utf-8")); //convert input into friendly characters to stop XSS $value = mysql_real_escape_string($value); } return $value; }
  17. thanks bro. so which all functions shall i add up in the clean function? 1. mysql_real_escape_string 2. htmlspecialchars 3. stripslashes ??? 4. trim??? anymore shall i add up?
  18. how bout like this? function clean($str){ $str = mysql_real_escape_string($str); $str = htmlspecialchars($str); $str = strip_tags($str); return($str); ) /////////////////////////////////// function insertP($postData) { $sql = " INSERT INTO table SET aname = '".$_SESSION['aname']."', cname = '".clean($postData['cname'])."', address = '".clean($postData['address'])."', hnumber = '".clean($postData['hnumber'])."', altnumber = '".clean($postData['altnumber'])."', lamount = '".clean($postData['lamount'])."', mrepayments = '".clean($postData['mrepayments'])."', ssn = '".clean($postData['ssn'])."', dln = '".clean($postData['dln'])."', mincome = '".clean($postData['mincome'])."', lpayday = '".clean($postData['lpayday'])."', npayday = '".clean($postData['npayday'])."', abalance = '".clean($postData['abalance'])."', msaving = '".clean($postData['msaving'])."', dob = '".clean($postData['dob'])."', apnumber = '".clean($postData['apnumber'])."', comments = '".clean($postData['comments'])."', status = '".clean($postData['status'])."', time = '".time()."' "; executeSql($sql); } btw do i have to use it for time aswell?
  19. oh yes, would this be the right way to do it? function insertP($postData) { $postData = mysql_real_escape_string(trim(strip_tags($postData)));// im doing it here? $sql = " INSERT INTO table SET aname = '".$_SESSION['aname']."', cname = '".$postData['cname']."', address = '".$postData['address']."', hnumber = '".$postData['hnumber']."', altnumber = '".$postData['altnumber']."', lamount = '".$postData['lamount']."', mrepayments = '".$postData['mrepayments']."', ssn = '".$postData['ssn']."', dln = '".$postData['dln']."', mincome = '".$postData['mincome']."', lpayday = '".$postData['lpayday']."', npayday = '".$postData['npayday']."', abalance = '".$postData['abalance']."', msaving = '".$postData['msaving']."', dob = '".$postData['dob']."', apnumber = '".$postData['apnumber']."', comments = '".$postData['comments']."', status = '".$postData['status']."', time = '".time()."' "; executeSql($sql);
×
×
  • 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.