Jump to content

phpretard

Members
  • Posts

    821
  • Joined

  • Last visited

    Never

Everything posted by phpretard

  1. I can appreciate a good rant... please elaborate as I use this method often.
  2. All I can really add is you have 2 M's in amount in one of your alerts. it just caught my eye and thought you might want to know. alert('Please enter a positive ammount!');
  3. $result = mysql_query("SELECT * FROM table LIMIT 10") while($row = mysql_fetch_array($result)) { 10 }
  4. I am trying to echo TESTING as many time as the from element specifies. I know it is all wrong but I have always had a problem wrapping my brains around the array. I am getting close though. This is the general layout. $s=$_GET['s']; if ($s!=''){ $selectbox=array($s); } print_r($state_array); // Array ( [0] => 1 ) <-- This of course yields the number of the option // FORM ELEMENT <select name='selectbox' class='select' onchange=\"document.location=this.value\"> <option value=''>Pick A Number</option> <option value='?page=$page&s=1'>One</option> <option value='?page=$page&s=2'>Two</option> <option value='?page=$page&s=3'>Three</option> <option value='?page=$page&s=4'>Four</option> </select> // I WOULD LIKE TO ECHO TESTING AS MANY TIMES THE VALUE OF $s IF($s!='') { $i=0; foreach($selectbox as $val){ echo $TESTING."<br>"; $i++; } } So if I pick 2 I would like to see TESTING TESTING Any help this evening?
  5. I have no Idea what this means... Column 'username' in where clause is ambiguous
  6. You see... I have read through this BEFORE I POSTED and am not sure which applies to a login. JOIN JOIN works in the same way as the SELECT statement above—it returns a result set with columns from different tables. The advantage of using an explicit JOIN over an implied one is greater control over your result set, and possibly improved performance when many tables are involved. There are several types of JOIN—LEFT, RIGHT, and FULL OUTER; INNER; and CROSS. The type you use is determined by the results you want to see. For example, using a LEFT OUTER JOIN will return all relevant rows from the first table listed, while potentially dropping rows from the second table listed if they don’t have information that correlates in the first table. This differs from an INNER JOIN or an implied JOIN. An INNER JOIN will only return rows for which there is data in both tables. Use the following JOIN statement for the first SELECT query above: SELECT table1.column1, table2.column2 FROM table1 INNER JOIN table2 ON table1.column1 = table2.column1;
  7. Left Join, Right Join, array Join, Join the party? How about just a point in the right direction...
  8. So here is what I replaced it with and it tells give the error assign when a username does not exist. $check = mysql_query("SELECT Administrators.username, Appraisers.username FROM Administrators, Appraisers where Administrators.username = '".$_POST['username']."' OR Appraisers.username = '".$_POST['username']."'")or die(mysql_error()); Any pointers?
  9. Why won't this work? $result = mysql_query("SELECT table1.username, table2.username FROM table1, table2 WHERE username = '".$_POST['username']."'");
  10. if ($ext=='???'){ PASS } else { NO DICE } I am not sure where to interupt th code either. Like that?
  11. Can some help me modify this to accept only .jpg or .gif <input name='uploaded' type='file' size='50' DISABLED /> // FORM FIELD function findexts ($filename) { $filename = strtolower($filename) ; $exts = split("[/\\.]", $filename) ; $n = count($exts)-1; $exts = $exts[$n]; return $exts; } $ext = findexts ($_FILES['uploaded']['name']) ; $ran = $_SESSION['MemberID']; $ran2 = $ran."."; $target = "banners/logos/"; $target = $target . $ran2.$ext; if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) { $E="UPLOADED"; } else { $E="ERROR UPLOADING"; }
  12. I really apprieciatte what Mr. DarkWater has put together for me up thier. Does that all go into one file? What I have read/searched and what you have ther now have me confused.
  13. I think you've read read my screen name wrong. It's ph-"pretard" I am sorry you have retardphobia
  14. Why do you hate me? I didn't do anything but ask a question. Thank for your help!!! It's off to cron with me.
  15. Could you point me to an EASY cron manual?
  16. Is there a way to expire table data based on a date. An example would be: I upload information into "field 1" on 1-1-2008 and did not update information in "field 2" by 1-3-2008 then the information in field one would be deleted on 1-3-2008. Does this make any sense?
  17. the problem is it display all of the county checkboxes in a big "pile". Yes I can order the display but I need help seperating them by State. I want to display all the counties in FL in a table or DIV then all the counties in GA in table or DIV and so on. The closest I can get is Marking each county with it's State name. I hope this helps you help me... http://www.appraisernow.com/stateselectCOUTIES2.php <-- THE CODE AT WORK /********************** THIS CHECKS TO SEE WHAT COUNTIES ARE ALREADY LISTED IN THE MEMBERS DB ****************************/ $EXTsql = "SELECT * FROM members WHERE MemberID='".$_SESSION['MemberID']."' ORDER by Counties"; $EXTresult = mysql_query($EXTsql); while($row = mysql_fetch_array($EXTresult)) { $CountiesEXT=$row['Counties']; } /********************** THIS GET THE STATES FROM THE MEMBERS DATABASE (COMMA SEPERATED) ****************************/ $GET_STATESsql = "SELECT * FROM members WHERE MemberID='APP-1299754007' "; $GET_STATESresult = mysql_query($GET_STATESsql); while($row = mysql_fetch_array($GET_STATESresult)) { $States=$row['States2']; } $States2=explode(", ", $States); // print_r($States2); I DONT KNOW IF THIS HELPS BUT THE PRINT IS -- Array ( [0] => FL [1] => GA [2] => AL ) -- /******** TAKES THE STATES FROM THE MEMBERS TABLE AND QUERIES THE ZIPCODE TABLE TO FIND THE CORRISPONDING COUNTIES AND DISPLAY THEM AS CHECKBOXES *********/ foreach($States2 as $States => $States1){ $ALL_COUNTIESresult = mysql_query("SELECT DISTINCT County FROM ZipCodes WHERE State='$States1' ORDER by County"); while($row = mysql_fetch_array($ALL_COUNTIESresult)) { $AllCounties[] = $row['County']; } $CountyIM=implode(",", $AllCounties); $CountyEX=explode(",", $CountyIM); $CountyTotal=count($CountyEX); foreach ($CountyEX as $County1){ if(stristr($CountiesEXT, $County1)) { $County3="<div style='width:24%; float:left; font-size:13px; height:25px;'><input type=checkbox name=Counties[] Value='$County1' checked> $County1, $States1</div>"; // AT THE TOP OF THE SCRIPT WE CHECKED FOR COUNTIES IF THEY ARE ARLEADY IN THE DB THEY'RE CHECKED } // END STRISTR else { $County3="<div style='width:24%; float:left; font-size:13px; height:25px;'><input type=checkbox name=Counties[] Value='$County1'> $County1, $States1</div>"; // (TOP OF THE SCRIPT) IF THEY ARE NOT IN THE DB THEY ARE NOT CHECKED } // END ELSE echo "$County3"; // DISPLAY CHECKBOXES } // END FOR FOR EACH } // END FOR EACH
  18. Here is an example of the output: http://www.appraisernow.com/stateselectCOUTIES2.php
  19. Nothing? Not even a "What the heck are you talking about?"
  20. I would turn notice's off in your php.ini file frankly. Basically it wants you to declare a variable before you try to use it.. so for instance.. instead of dynamically creating $themeImageValues["themeName0"]["blockArrowColor"] it wants you to do something like this: $themeImageValues["themeName0"] = array ("blockArrowColor", "blockBackgroundImage"); and THEN assign values to to them. Since this is just not practical in PHP, I would simply turn notices off, most people do.
×
×
  • 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.