Jump to content

phpretard

Members
  • Posts

    821
  • Joined

  • Last visited

    Never

Everything posted by phpretard

  1. I changed the headers and that didn't work???? This is the first line that shows in the email. >>> Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Nonspam: None Then thier are several breaks and then the written html Do you think that has something to with it?
  2. My email send all the inflrmation only in text not html. <? session_start(); if (isset($_POST['SendOrder_y'])){ $CopyMe=$_POST['SendCopy']; $to = "me@me.com"; $to1 = $CopyMe; $subject = "Order Form"; $headers = "From:".$_SESSION['email']."\r\n"; $headers .= "MIME-Version: 1.0\r\n" . "Content-Type: text/html; charset=\"iso-8859-1\"\r\n" . "Content-Transfer-Encoding: 7bit\r\n"; ob_start(); // start buffer include ("orderSendEmail.php"); $message = ob_get_contents(); // assign buffer contents to variable ob_end_clean(); // end buffer and remove buffer contents mail($to, $subject, $message, $headers); echo"SENT"; } ?> I am not going to post the whole email but this should give you an Idea of my trouble today. Below is what actually shows up in the email. Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Nonspam: None <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <link href="email.css" rel="stylesheet" type="text/css" /> <title>FHS Appraiser Source</title> </head> <body> <table border=0 width=100%><tr> <td><b><font face=verdana>APPRAISAL ORDER REQUEST FORM</font></b></td> <td -------- AND SO ON... Any help today?
  3. http://www.w3schools.com/PHP/default.asp http://www.php.net/manual/en/index.php Here are some of my favorites.
  4. I don't know if this helps the cause but when I put this in the last loop all the boxes get checked: $result3 = mysql_query("SELECT DISTINCT County FROM ZipCodes WHERE State='$State' ORDER by County "); while($row = mysql_fetch_array($result3)) { $CountyAll=$row['County']; /////FROM HERE if(stristr($County3, $AllCounties)===FALSE) { $CHK="checked"; } /////TO HERE $AllCounties= "<div style='width:24%; float:left; font-size:13px;'><input type=checkbox name=Counties[] Value='$CountyAll' $CHK>$CountyAll</div>"; echo $AllCounties; } But only when set to FALSE. It should be obvious by now I am not sure what I need to do here.
  5. Table 1 holds a select number of counties. Table 2 holds all the counties in the State. I want to display (in checkbox form) all the counties in the State from table 2 but have the select counties from table 1 checked. Understand? By the wat way do you want DB with that info in it? It's quite useful and I just bought it. It comes in lots of formats...
  6. I should mention that all the code ran seperately works fine and the html outputs the same thing.
  7. I promise this is NOT as compicated as it looks: CURRENT LIST IN TABLE: $sql = "SELECT * FROM members WHERE State='$State' ORDER by Counties"; $result = mysql_query($sql); while($row = mysql_fetch_array($result)) { $Counties2=str_replace(", ", "<li>", ($row['Counties'])); $County2 = explode("<li>", $Counties2); $CountyTotal = count($County2); } foreach ($County2 as $County1){ for ($i=0; $i<$CountyTotal; ++$i){ $County3="<div style='width:24%; float:left; font-size:13px;'><input type=checkbox name=Counties[] Value='$County1'>$County1</div>"; } }// CURRENT LIST OF COUNTIES LIST FROM A DIFFERENT TABLE: $result2 = mysql_query("SELECT DISTINCT County FROM ZipCodes WHERE State='$State' ORDER by County "); while($row = mysql_fetch_array($result2)) { $CountyList=$row['County']; $AllCounties="<div style='width:24%; float:left; font-size:13px;'><input type=checkbox name=Counties[] Value='$CountyList'>$CountyList</div>"; } // END ALL COUNTIES LIST /********COMPARE********/ if(stristr($County3, $AllCounties)) { $CHK="checked"; } /*****END COMPARE*******/ WHAT I THOUGHT WOULD CHECK THE BOXES: // LIST COMPARED RESULTS $result3 = mysql_query("SELECT DISTINCT County FROM ZipCodes WHERE State='$State' ORDER by County "); while($row = mysql_fetch_array($result3)) { $CountyAll=$row['County']; $AllCountiesCHK= "<div style='width:24%; float:left; font-size:13px;'><input type=checkbox name=Counties[] Value='$CountyAll' $CHK>$CountyAll</div>"; echo $AllCountiesCHK; } Well it doesn't ckeck the boxes. Any thought?
  8. I took it out of the while loop and it works great. Thank you for all your help on this one!!!!!
  9. PHP CODE: $result = mysql_query("SELECT * FROM members WHERE State='$LicState' ORDER by Counties"); while($row = mysql_fetch_array($result)) { $Counties=explode(', ' , $row['Counties']); foreach ($Counties as $County1) echo "<div style='width:24%; float:left; font-size:13px;'><input type='checkbox' name='Counties[]' Value='$County1'>$County1</div>"; print_r($Counties); } HTML OUTPUT (MINUS THE STYLE INFO): <div><input type='checkbox' name='Counties[]' Value=''></div> <<<<<<<<<<<<<< HE WONT GO AWAY <div><input type='checkbox' name='Counties[]' Value='HARDEE'>HARDEE</div> <div><input type='checkbox' name='Counties[]' Value='HILLSBOROUGH'>HILLSBOROUGH</div> <div><input type='checkbox' name='Counties[]' Value='JACKSON'>JACKSON</div> <div><input type='checkbox' name='Counties[]' Value='JEFFERSON'>JEFFERSON</div> <div><input type='checkbox' name='Counties[]' Value='LAKE'>LAKE</div> <div><input type='checkbox' name='Counties[]' Value='LEE'>LEE</div> <div><input type='checkbox' name='Counties[]' Value='LEON'>LEON</div> <div><input type='checkbox' name='Counties[]' Value='LIBERTY'>LIBERTY</div> <div><input type='checkbox' name='Counties[]' Value='MADISON'>MADISON</div>
  10. TEXT FEILD IN DB EXACTLY: "HARDEE, HILLSBOROUGH, JACKSON, JEFFERSON, LAKE, LEE, LEON, LIBERTY, MADISON" Where is the empty array comming from or better yet how do I get rid of it? I have read into ---$size = intval(count($County1) - 1);--- but am not sure where or how to implement such a beast. print_r yeilds: Array ( [0] => ) Array ( [0] => HARDEE [1] => HILLSBOROUGH [2] => JACKSON [3] => JEFFERSON [4] => LAKE [5] => LEE [6] => LEON [7] => LIBERTY [8] => MADISON ) //END Code Again: $result = mysql_query("SELECT * FROM members WHERE State='$LicState' ORDER by Counties"); while($row = mysql_fetch_array($result)) { $Counties=explode(',',$row['Counties']); foreach ($Counties as $County1) echo "<div style='width:24%; float:left; font-size:13px;'><input type='checkbox' name='Counties[]' Value='$County1'>$County1</div>"; }
  11. That is truly fantastic !! you shortened the code...but the print_r Shows 2 Array ( [0] => ) one with NO VALUE (the empty checkbox of course) and then the rest of the array with all of the needed values. How do I get rid of Array ( [0] => )?
  12. What you see at the top of the page is cut directly from the DB. No comma. The extra checkbox is actually showing up first???
  13. When I echo $size it shows ten number ones. I only have nine entries. It unfortunately did not solve the problem
  14. That doesn't solve the problem but thank you for pointing that out
  15. I have a feild called counties in my DB with the following values: HARDEE, HILLSBOROUGH, JACKSON, JEFFERSON, LAKE, LEE, LEON, LIBERTY, MADISON I just want them to show up with a checkbox for each one. I keep getting 1 EXTRA CHECKBOX Any help today? <? $result = mysql_query("SELECT * FROM members WHERE State='$LicState' ORDER by Counties"); while($row = mysql_fetch_array($result)) { $Counties=$row['Counties']; $County2 = explode(',', $Counties); foreach ($County2 as $County1) { $size = count($County1); for ($i=0; $i<$size; ++$i){ echo "<div style='width:24%; float:left; font-size:13px;'><input type=checkbox name=Counties[] Value='$County1'>$County1</div>"; } } } ?>
  16. Could you be a little more specific about the real escape string please and the proposed dangers?
  17. $Type=$_POST['Type']; $mainSearch=$_POST['mainSearch']; SELECT * FROM table WHERE City, State, ZipCode LIKE '$mainSearch%' AND $type='1' Why doesn't this work? It works without the -- , State, ZipCode -- so I know that' the problem. I just don't know the repair. Any help?
  18. I am trying to make sure someone post a date at least greater than today. if (!ereg ("([0-9]{1,2})/([0-9]{1,2})/([0-9]{4})", $LicEXP)) All I can figure is the format? Any help today?
  19. This worked $result = mysql_query("SELECT City FROM ZipCodes ORDER by City"); while($row = mysql_fetch_array($result)) { $a[]=$row['City']; } $q=$_GET["q"]; //lookup all hints from array if length of q>0 if (strlen($q) > 0) { $hint=""; for($i=0; $i<count($a); $i++) { if (strtolower($q)==strtolower(substr($a[$i],0,strlen($q)))) { if ($hint=="") { $hint=$a[$i]; } else { $hint=$hint." , ".$a[$i]; } } } } // Set output to "no suggestion" if no hint were found // or to the correct values if ($hint == "") { $response="no suggestion"; } else { $response=$hint; } //output the response echo $response; Thanks
  20. How can I turn this into an array? $result = mysql_query("SELECT City FROM ZipCodes ORDER by City"); while($row = mysql_fetch_array($result)) { $a[]=$row['City']; } echo $a; // Just echos "Array" and I have lots of cities in the DB
  21. It's OK... I do need the US states Thanks anyway . I think I found a place I can buy the list I need
  22. Exactly...But... US States, Counties and Cities Big list I know. I am still searching the net. I was hoping you all have something like that laying around somewhere. http://www.zip-area.com/ This site has it. Thank again!!!
  23. I have that. What I need is a DB with all states, counties and cities associated. I know this is a huge request...but I'm sure it's out there somewhere. I just wan't to know if anyone out there is sharing the SQL-import or XML-spreadsheet. Thanks!
  24. I am building a database with a list of States Cities and Counties. Obviously the lists are out there and I could input each one. Does anyone have a list or know of a list I can just download or import?
×
×
  • 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.