Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by PFMaBiSmAd

  1. array_shift() array_push()
  2. It will work if $arr0 is an array AND that code is not inside of a HTML tag, such as a form element, that would hide the values in the source of the page.
  3. jumped to a conclusion there. Changing the embedded hyper-link color won't help either, they will just think you highlighted some text when you wrote the post.
  4. That won't solve the problem of people using the 'Quote' link instead of the 'Reply' link. It would take moving the 'Quote' link out of their field of view (i.e. putting it into the menu bar after the 'Reply' button.)
  5. print_r() only returns the data if you set the second parameter to TRUE. You do realize that each browser you have maintains separate cookies and would only supply its' cookies to the server with the http request.
  6. http://www.phpfreaks.com/forums/index.php/topic,95426.0.html
  7. Cookies are domain specific. Also, depending on the subdomain/hostname and path settings in the cookie, cookies can also be specific to the subdomain/hostname and path where they were set. Only valid cookies (that have not expired), that match the domain, and optionally match the subdomain/hostname and path of the URL that is being requested will be sent to the server with the http request.
  8. What? The two files you mentioned should have always been in those locations because the correct version of them come with the .zip package. Did you also set the extension_dir = setting to point to your ext folder? Also, php5.3 comes with a native mysql driver and it is no longer necessary to use the libmysql.dll.
  9. rtrim() (and most php functions) RETURN the value they produce. You are not assigning that value to $keys, so, $keys simply has the original value in it.
  10. The Loaded Configuration File is all that you need to be concerned with (you would need to recompile php to change the Configuration File Path value.) Did you reboot your computer to get any change made to the Windows Path statement to take effect and did you stop and start your web server to get any change made to php.ini to take effect? Also, what method was used to install 5.2.6, because that can have an effect on php settings and on installing extensions (i.e. the msi installer puts settings into the Windows registry that prevents settings you put into the php.ini from working.)
  11. $_SERVER["HTTP_HOST"]
  12. Just detect a change in the client name and do any special processing - $last_client = ""; // initialize to a value that will never appear in the data foreach($units_total as $units_row){ $clientname = $units_row['clientname']; if($last_client != $clientname){ // do any special processing here when the client name changes // such as starting a new content section or initializing other variables // remember the new client name $last_client = $clientname; } // other processing in the loop ... }
  13. Any reason you started this thread when you already had an existing thread where someone had already bothered to ask if you had a specific question about doing this - http://www.phpfreaks.com/forums/index.php/topic,299607.0.html
  14. Because your issue is in your presentation code, not your query, I'm going to move this thread to the php help section... It will likely get more responses there. Could you show in your desired output what you want in the same table cell and where you want to start new table rows. Also, how many columns across do you want before you start a new table row?
  15. That's not an error. It is raw php code. You are likely using short open tags <? If you only use full opening php tags <?php you will avoid this problem every time you switch servers.
  16. You do realize that when you have an existing active thread for a problem and you start a new thread for that same problem, that you loose the history of how you go to this point and surprisingly creating more threads for the same problem actually gets you less help than you would have gotten if you had continued with your original thread.
  17. Just use one array - <?php $arr = array(); for ($i=1; $i<=7; $i++) { $row = mysql_fetch_array($result); $arr['EUR'][$i] = $row['EUR']; $arr['USD'][$i] = $row['USD']; $arr['AUD'][$i] = $row['AUD']; $arr['NZD'][$i] = $row['NZD']; $arr['CAD'][$i] = $row['CAD']; } $currency = 'EUR'; $delivery_period = 3; echo $arr[$currency][$delivery_period]; // $arr['EUR'][3] ?>
  18. Please see the Example #3 code in the php.net documentation. The array you are getting by using name="att[]" isn't exactly what your code is accessing (use print_r() to see what is in $values.)
  19. Your code has no error checking logic in to to test if the upload worked or failed. You must always test for any possible errors and validate data before you attempt to reference that data. Ref: http://us.php.net/manual/en/features.file-upload.errors.php Also see Example #3 at the following link for an example of code that at least tests the ['error'] element of the uploaded data - http://us.php.net/manual/en/features.file-upload.post-method.php
  20. Since that is not the code that actually outputs the data to the browser, it would be a little hard for anyone here to tell you what is wrong with your code that does output that data. Also, have you checked directly in your database if you have stored all the data or if the first character is all that got stored.
  21. You should be using DECIMAL data type - http://dev.mysql.com/doc/refman/5.0/en/problems-with-float.html
  22. To start with, your table design is horrific. You have all the products/prices stored in one row, using separate columns. Your table should have an order id, the user id (or username) and the product id and quantity, one row for each product in their cart. Your code is attempting to loop through the rows for the user, but your table design only has one row with multiple columns. For your current table design, you would need to reference each of the "productx", "productx_price" columns in that single row. I recommend fixing your table design. It will result in the simplest and fastest code.
  23. A) $this->_tmp_dir is either empty or is set to a value that is outside of the open_basedir allowed path(s), B) Have you checked what is in $this->_tmp_dir to see why it might be causing that error, C) You can apparently ignore that warning because the code stores the data in memory if it cannot create a temporary file.
×
×
  • 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.