Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. What you need is urlencode(). echo urlencode("3278 Blue Jay dr, scottsdale AZ 44559");
  2. It's the same thing as doing: $mess = $mess . ":".$splitu[$i].":"; A better example is with an arithmetic example: $a = 2; $b = 4; $a += $b; This is the same as $a = $a + $b;
  3. You're not creating the array correctly. $Array = Array("0000", "0010", "9000"); Before you were just giving it 1 element [0] => '"0000", "0010", "9000"'
  4. Can you post the code for the entire page that shows a blank page?
  5. You're not concatenating each letter with the surrounding ':' character. You're always overwriting the last $mess with the new split element. Change this line to: (notice the . ) $mess .= ":".$splitu[$i].":";
  6. Without examining your code I can tell you the most of the time a blank page usually refers to a fatal syntactical error that's being suppressed. After your first opening <?php tag add these lines: ini_set ("display_errors", "1"); error_reporting(E_ALL);
  7. Check out this sticky: http://www.phpfreaks.com/forums/index.php/topic,54859.0.html
  8. Check out this thread: http://www.phpfreaks.com/forums/index.php/topic,247209.0.html
  9. 1) Your query may be failing, change this line: [code] $result = mysql_query($qry) or die(mysql_error()); 2) This IF is failing. if(mysql_num_rows($result) == 1) { [/code]
  10. I see, I'm assuming you are talking about suggesting this to him the other night. His query in his original post did not have a JOIN but he did match against common fields so there are no duplicates. Which can have the same effect. In any event, glad it's working.
  11. Hmm that's weird it's working because your options don't have any values... Well, if it works it work Please mark as [sOLVED].
  12. I believe I mentioned this in one of my previous posts but, the problem that's occurring is due to the extra comma after the #22. You have to change your logic a bit. $i=0; //ADDED $query = "SELECT * FROM supplements WHERE supp_id IN ("; foreach ($_SESSION['cart'] as $key => $value) { $query .= ($i==0) ? $key : ','.$key; //CHANGED $i++; //ADDED }
  13. Also, when you invoke stripslashes() on a variable it doesn't change the variable unless you re-assign it. It will display the $landline with stripslashes but it doesn't actually change the value.
  14. YW I assume this solves your problem? Please mark [sOLVED], thanks!
  15. You can actually change your code in the CSS for a specific browser(s) by using browser conditionals. i.e. A full list of this can be found here: CSS - Conditionals
  16. You have to select your DB before you perform your query. You also should check your $con before you select your DB. Change these lines so they're in this order: $con = mysql_connect($dbhost, $dbuser, $dbpass); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db($dbname, $con); $members = mysql_query("SELECT * FROM accounts");
  17. Your first page should look like: (I assume this is already in a form) for($i=0; $i echo ""; $result_emp = mysql_query("SELECT * FROM emp_details"); while($row = mysql_fetch_assoc($result_emp)) { echo "".$row['emp_f_name']." ".$row['emp_l_name'].""; } echo ""; } ?> Second page, try this: foreach ($_POST['emp_id'] as $value) { echo "Value: $value \n"; }
  18. Change this line to: die('Could not connect: ' . mysql_error());
  19. [quote author=PFMaBiSmAd link=topic=87000.msg1156505#msg1156505 date=1239334891] He's just posting non-relevant crap to get a link to his site on this forum. I already reported the post. [/quote] Yes, he most definitely is.  Only has 2 posts but they both reference his/the site... Good luck with your advertising technique!
  20. [quote]A) The thread was probably solved three years ago,[/quote] Hahaha, didn't even see the date... I always click on "Show unread posts since last visit.", and respond. jfnavat, it's all your fault!!!  j/k  How did you find this thread anyway?
  21. True, but that forum is in spanish...
  22. If your ultimate goal is to see if the number is in the array you can just use in_array(). Not really sure what that means... You can get the first and second digit of $var by doing: $var = "98"; echo "First Digit: " . $var[0]; echo " Second Digit: " . $var[1]; ?> Hope this helps.
  23. Are you declaring $emp_id_array as an array? Forget about the code I suggested before and try replacing this block with this: $emp_id_array = array(); for ($i=0; $i{ $emp_id_array = addslashes($_POST['emp_id'][$i]); } foreach ($emp_id_array as $value) { echo "Value: $value \n"; }
  24. It's hard to tell without knowing the design of how your forums are setup, but I believe this clause: AND p.parentid='0' would only grab posts from the "main board". You may want to change it to something similar to: AND p.parentid IN(0, 1, 2 ,3) Again, I would need to know your table structure and how you differentiate the "main board" from children. Hope this helps.
  25. That will also put a comma in front of the first extracted record. You might want something like: $title .= (!isset($title)) ? $row['title'] : ", ".$row['title']; But if the way you have works, it works...
×
×
  • 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.