Jump to content

jmac2501

Members
  • Posts

    59
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jmac2501's Achievements

Member

Member (2/5)

0

Reputation

  1. The code below works fine in Fire fox but doesn't work in IE. it get to this part: if (isset($_POST['submit_pwd'])){ $pass = isset($_POST['passwd']) ? $_POST['passwd'] : ''; and goes doesn't prosses any passwork right or wrong. just goes to the last else. <?php require_once 'mySetups.php'; if (isset($_POST['staConfig'])) { $thetext=$_POST['staConfig']; $page_content = writeStaConfigFile($thetext); echo $page_content; sleep(2); echo '<form action=mydocs.php; method="post" name="cleanStart">'; } function showForm($error="<br><br>LINE SUPPORT ADMIN PASSWORD:"){ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html> <body> <?php echo $error; ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="pwd"> <table> <tr> <td><input name="passwd" type="password"/></td> </tr> <tr> <td align="center"><br/> <input type="submit" name="submit_pwd" value="Login"/> </td> </tr> </table> </form> </body> <?php } ?> <?php $Password = 'techie11'; // Set password here if (isset($_POST['submit_pwd'])){ $pass = isset($_POST['passwd']) ? $_POST['passwd'] : ''; if ($pass != $Password) { showForm("Wrong password"); exit(); } else { echo "Welcome master of all knowledge."; echo '<form method="post" action='.$php_self.'>'; echo '<input type="hidden" name="staConfig" value="DELL 1603\nDrive Build" >'; echo '<input type="submit" name="Submit" value="Write to File">'; echo "</form>"; } } else { showForm(); exit(); } ?>
  2. I didn't get a change to check it without building the tables and all that. Was helping out a friend and checking his work. But if it looks good then thanks.
  3. Hey can i have some one check this out and see if its right? thanks Employees A_ID FirstName LastName Position Salery 1 John Wane FA1 12.00 2 Fred Clause Tester 9.00 3 Rob Myers Drive Builder 11.00 Hire B_ID DateHired Department 1 12/15/99 Warranty 2 09/09/05 Develipment 3 07/11/06 Warranty SELECT Employees.LastName, Employees.FirstName,Hire.DateHired, FROM Employees INNER JOIN Hire ON Employees.A_Id=Hire.B_Id ORDER BY Employees.LastName Output= LastName FirstName Hire Date Clause Fred 09/09/05 Myers Rob 07/11/06 Wane John 12/15/99 Thanks again.
  4. any help ??? Please ???
  5. ok i used that now i get this error Helo command rejected: need fully-qualified hostname here is my setting: var $Hostname = "mail.****.com"; var $Host = "mail.****.com"; var $Port = 25; var $Helo = "mail.****.com"; var $SMTPAuth = true; then username and password what should the helo be???
  6. what code do you want to see? There is the class.phpmailer.php or one with the: ini_set("include_path", ".:/path/to/phpmailer/dir"); require("http://****/Nuke/phpmailer/class.phpmailer.php");
  7. I am having a problem with my phpmailer. this is the error message I keep getting. Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:\Sites\Single4\****\webroot\Nuke\html\modules\vwar\includes\functions_admin.php on line 599 I have no access to my php.ini so i was told to use this ini_set to bypass. so this is what i put in below. ini_set("include_path", ".:/path/to/phpmailer/dir"); require("http://****/Nuke/phpmailer/class.phpmailer.php"); Can anyone help me fix it.
  8. how would you echo this href with a varible in it? <a href="http://metrolistmls.com/cgi-bin/GetOneR.cfm?County=SA&iRow=0&nJL=7&MLSNum=".$reo"> http://metrolistmls.com/cgi-bin/GetOneR.cfm?County=SA&iRow=0&nJL=7&MLSNum=".$reo</a></p> Thanks
  9. nevermind I fixed it. Added $price = ""; to clear it.
  10. <?php error_reporting(E_ALL ^ E_NOTICE); $link = mysql_connect('mysql6.******.com', '******', '******') or die('Could not connect: ' . mysql_error()); mysql_select_db('*****') or die('Could not select database'); $query = "SELECT * FROM Listings"; $result = mysql_query($query); $num = mysql_num_rows($result); mysql_close($link); $i = 0; while ($i < $num) { $reo = mysql_result($result, $i, "reo"); require_once ("class_http.php"); $h = new http(); $h->dir = "/home/foo/bar/"; if (!$h->fetch("http://metrolistmls.com/cgi-bin/GetOneR.cfm?County=SA&iRow=0&nJL=7&MLSNum=" . $reo)) { echo "<h2>There is a problem with the http request!</h2>"; echo $h->log; exit(); } if ($beg = strpos($h->body, "http://mlsmedia.metrolistmls.com/bigphoto/", 0)) { $end = strpos($h->body, ".jpg", $beg); $pic = substr($h->body, $beg, ($end + 4) - $beg); echo ("$pic"); echo ("<br />"); } if ($beg = strpos($h->body, "<td align=\"center\" class=\"PageTitle\" width=\"534\"><b> $", 0)) { $end = strpos($h->body, "</b></td>", $beg); $price = substr($h->body, $beg + 55, ($end - 55) - $beg); echo ("$price"); echo ("<br />"); } if ($beg = strpos($h->body, "<td class=\"PageTitle\" colspan=\"3\" align=\"center\"><b>", 0)) { $end = strpos($h->body, ",", $beg); $streetaddress = substr($h->body, $beg + 52, ($end - 52) - $beg); echo ("$streetaddress"); echo ("<br />"); $str = '$streetaddress '; } if ($beg = strpos($h->body, "<td class=\"PageTitle\" colspan=\"3\" align=\"center\"><b>", 0)) { $end = strpos($h->body, "</b></td>", $beg); $city = substr($h->body, $beg + 56 + strlen($str), ($end - 61 - strlen($str)) - $beg); echo ("$city"); echo ("<br />"); } if ($beg = strpos($h->body, "<td width=\"16%\" class=\"FormTitle\">Sq Ft</td> <td width=\"14%\">", 0)) { $end = strpos($h->body, "</td> <td width=\"16%\"", $beg); $squarefeet = substr($h->body, $beg + 76, ($end - 76) - $beg); echo ("$squarefeet"); echo ("<br />"); } if ($beg = strpos($h->body, "<td width=\"16%\" class=\"FormTitle\">Bedrooms</td>", 0)) { $end = strpos($h->body, "</td> <td width=\"16%", $beg); $bed = substr($h->body, $beg + 97, ($end - 97) - $beg); echo ("$bed"); echo ("<br />"); } if ($beg = strpos($h->body, "<td width=\"16%\" class=\"FormTitle\">Full Baths</td>", 0)) { $end = strpos($h->body, "</td> <td width=\"16%", $beg); $Fbath = substr($h->body, $beg + 81, ($end - 81) - $beg); echo ("$Fbath"); echo ("<br />"); } if ($beg = strpos($h->body, "<td width=\"16%\" class=\"FormTitle\">Half Baths</td>", 0)) { $end = strpos($h->body, "</td> <td width=\"16%", $beg); $Hbath = substr($h->body, $beg + 99, ($end - 99) - $beg); echo ("$Hbath"); echo ("<br />"); } if ($beg = strpos($h->body, "<td width=\"60\"><b>Agent</b></td>", 0)) { $end = strpos($h->body, " ", $beg); $agent = substr($h->body, $beg + 85, ($end - 85) - $beg); if (trim($agent) == "Diane C Cox") { $agent = "Diane Cox"; $teng = "Lizette Gonzalez </td> </tr> </table> </td> </tr> <tr> <td height=\"17\" colspan=\"3\"> <table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"> <tr> <td width=\"60\"><b>Office</b></td> <td class=\"body14\"> <a href=\"../Offices/01rmxg08.cfm\" class=\"link2\"><b>RE/MAX Gold Sacramento</b></a>"; } if (trim($agent) == "Lizette Gonzalez") { $agent = "Lizette Gonzalez"; echo ($agent); echo ("<br />"); } } if (trim($pic) == "") { $pic = "../images/nophoto1b_small.jpg"; } Echo ($price); if (empty($price)) { /* Connecting, selecting database */ $db_link = mysql_connect("mysql6.*****.com", "******", "******"); if (!$db_link) { die("Could not connect: " . mysql_error()); } mysql_select_db("******") or die("Could not select database"); $query = "DELETE FROM listings WHERE reo='$reo'"; mysql_query($query); echo "REO $reo deleted"; echo ("<br />"); mysql_close($db_link); } elseif (isset($price)) { $link = mysql_connect('mysql6.******.com', '******', '*****') or die('Could not connect: ' . mysql_error()); mysql_select_db('*****') or die('Could not select database'); $query = ("UPDATE listings SET streetaddress='$streetaddress', city='$city', price='$price', squarefeet='$squarefeet', bed='$bed', Fbath='$Fbath','$Hbath', reo='$reo', agent='$agent', pic='$pic' WHERE reo='$reo'"); mysql_query($query); echo ($sql); echo "Record Updated"; mysql_close($link); } if ($i > $num) { break; } $i++; } if ($sql) { echo "Success!"; echo $sql or die("could not connect to the database"); } elseif (!$sql) { echo ("FAILED TO INPUT DATA <p><a href=\"../Members/Error.htm\">CLICK HERE</a></p>"); } ?>
  11. ok so i figured out the problem but am looking for a solution. How would i clear out my previous varables? my script runs and gathers variables but if it comes acrossed $price and there is no $price it uses its last cycles variables. i.e. cycle 1 price = 1 echoed $price = 1 cycle 2 price = 2 echoed $price = 2 cycle 3 price = echoed $price = 2 (instead of being empty)
  12. I made it so that it is empty to test... but everything else looks ok besides the second mysql_query($query);?
  13. i tryed that and still nothing... here is my whole code for that part: $link = mysql_connect('mysql6.*******.com', '******', '*******') or die('Could not connect: ' . mysql_error()); mysql_select_db('*****') or die('Could not select database'); $query = "DELETE FROM listings WHERE reo='$reo'"; mysql_query($query)or die(mysql_error()."<p>With Query:<br>$query"); mysql_query($query); echo "REO $reo deleted"; mysql_close($link); echo ("<br />");
×
×
  • 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.