Jump to content

litebearer

Members
  • Posts

    2,356
  • Joined

  • Last visited

Everything posted by litebearer

  1. Decimal should do fine; might consider a field that defines the currency ie dollar us, euros etc
  2. a basic idea... http://www.plus2net.com/php_tutorial/php_multi_file_upload.php
  3. try this... function updateid($edit_id,$edit_name,$edit_email,$edit_verified){ $mysql_query = "UPDATE users SET name='$edit_name',email='$edit_email',verified='$edit_verified' WHERE user_id=$edit_id"; $results = mysql_query($sqlquery); echo mysql_num_rows($results) . "<br>"; if(mysql_num_rows($result)<1) { echo "record not found"; } return; }
  4. perhaps... <a href="java_func(<?PHP echo $i; ?>)"><?PHP echo $businessname; ?></a>
  5. use 'a' rather than 'w'
  6. might look here... http://www.nstoia.com/toh/imageresize.php
  7. what I wrote was NOT the exact coding (hence PSUEDO code) The purpose of $i is simply to keep looping thru the array until all the elements have been processed. Perhaps some extra commenting may help <?PHP $InterestsList = $_POST[interests]; // get the variable from the form $Interests= explode(",", $InterestsList); // creates an array where each word that was separated by comma becomes an element in the array $InterestsCount = count($Interests); // Counts the total elements in the array connect to database // Do you actual database connection here $i=0; // set your counter while ($i < $InterestsCount) { // begin your loop $what_interest = $Interests[$i]; // get the value of the current element $result = mysql_query("insert into interests (User_ID,Interests) values('$loggedin[user_ID]', '$what_interest')"; // insert appropriate values into the database $i = $ i + 1; // increment your counter } ?> any clearer?
  8. <0ld fart has glassess off) - the $1 should be an 'i'
  9. use a div that can be hidden and or displayed via a button/text. include the form in the 'hidden div'. and you can refer back to same page - have an IF statement to determine whether to include the hidden for div or the div that display the output make sense?
  10. Psuedo code... $InterestsList = $_POST[interests]; $Interests= explode(",", $InterestsList); count the number of elements in the $interests array connect to database $i=0; while ($1 < count) $variable = array value[$l] insert into table field $variable } ?> make sense?
  11. Have you considered convert the table to a pdf file?
  12. just a thought... might look into FULL TEXT searching
  13. ideally the concept is that php (or any server side 'language') should be separate from html/css etc. Not a really easy thing to do. It takes lots of planning. includes and functions are extremely helpful. perhaps taking 'similar' functions and combing them so that a 'key' parameter makes a completely different result. I for a long time (and unfortunately stiil so on too many occasions) try to 'do it all at once'. I find my best work comes when I work backwards AND keep the overall objective in mind (ie why is the site necessary and what specifically should its objective be). just my two cents.
  14. Hmmm... <?php $haystack = "Subject"; $needle = "Re:"; $pos = strpos($haystack,$needle); if($pos === false) { // string needle NOT found in haystack echo "Not found: " . $needle . " in " . $haystack; } else { // string needle found in haystack echo "Not found: " . $needle . " in " . $haystack; } echo "<br><br>"; $row['subject'] = "Re: Something"; $haystack = $row['subject']; $needle = "Re:"; $pos = strpos($haystack,$needle); if($pos === false) { // string needle NOT found in haystack echo "Not found: " . $needle . " in " . $haystack; } else { // string needle found in haystack echo "found: " . $needle . " in " . $haystack; } echo "<br><br>"; ?>
  15. perhaps this snippet may point you the way... WHERE date = DATE_ADD(CURDATE(), INTERVAL -1 DAY)
  16. Being terribly lazy, I prefer the use of separate fields for - area code / prefix / last four digits. Makes check for only numbers and a FULL phone number easier for me. Just a thought...
  17. Hmmm... I quickly scanned the tut, it does seem to allow you to... 1. Determine the width of the box (image) using wordwrap (length will then be calculated based upon the text content) 2. Choose what back ground color and folt color will be. 3. Choose what font and size you desire
  18. this part carries an implicit value of TRUE as long as there are more files ($file = readdir($handle)) Once there are no more files, the implicit value is now FALSE so the !== is saying to the "WHILE' - when the implict value become FALSE stop looping Make sense?
  19. Might try this tutorial right here on PHPFreaks... http://www.phpfreaks.com/tutorial/php-add-text-to-image
  20. bascially says 'do it til there are no more files'
  21. just a thought hardlt fully formed yet (psuedo code - someone smater than me could probably state it correctly)... count as 1 where month = january count as 2 where month = feb etc etc I suspect that this could be combined into one query then to display (1) have an array of the name of the months (2) loop thru the array displaying the links as with the corresponding values gatherd in the query A. As there is no need for anything else fromm the db at this stage, it inscreases speed adn reduces server usage B. simplifies the code Make sense?
  22. LOLOL Ok, second aside (yes I know the potential dangers involved). Frequently problems occur due to our eyes seeing one thing and our minds THINKING we are seeing something different. It may be appropriate to do an 'sql dump' (HEY! I am old fart and may not know the porper term). Post the 'dump' so that a 'different' pair of eyes can have the EXACT data you are using. Just a thought
  23. just as a minor assist - relative to not being able to post your screen shot... 1. dl a free pdf creator. 2. do a screen capture 3. paste screen catpure into word 4. print as pdf file and post it
  24. Ok, figured what the heck. This a site I have been developing (several years) for our local community. Would appreciate comment good, bad and indifferent. As you may note, most of what is offered on the site is free to businesses and residents of our small township. Thanks... http://www.wljol.com/
  25. Just a thought ... does $image_path contain the trailing slash (/) ? For some unknown reason, the post of your code is not visible to me.
×
×
  • 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.