Jump to content

CroNiX

Staff Alumni
  • Posts

    1,469
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by CroNiX

  1. The form controls need to be located within the form open (<form>) and close (</form>) tags. <form action = "test.php" method = "post"> <select name="Words"> <?php FOREACH($ddArray1 AS $word){ PRINT '<option value="'.$word.'">'.$word.'</option>'; } ?> </select> </form>
  2. You can't do that. .htaccess is processed before anything else.
  3. Log in as the webuser, not root (or sudo). Or have PHP create the file which should automatically have the correct permissions.
  4. I've found laracasts to be very helpful. https://laracasts.com/
  5. You are making this difficult to help you. To me, entire page means starting with <html> and ending with </html>. The code above does not contain these elements that you are using in your jQuery, so once again it's incomplete code: $(".invE_subtotal span") $(".invE_tax span") $(".invE_discount span") $(".invE_balance span")
  6. Again, we need the SOURCE of the full rendered page, not your php. Go to the page in the BROWSER and click view source, and copy/paste the whole thing here.
  7. The WHOLE complete page. There aren't even any TR's in that.
  8. Also, since you are using bound query parameters (good!) in your query, you shouldn't do this: $_POST = array_map( 'stripslashes', $_POST );
  9. It's being swapped because that's what you are telling it to do. INSERT INTO event_calendar (title,event_date,description) VALUES (:title, :description, :event_date)') Your insert is saying (in order), title, event_date, description but your VALUES (in order) are :title, :description, :event_date. Swap the :description and :event_date placeholders in the VALUE.
  10. It's hard to guess with just your description and no code to review, but are you using session_start() ??.
  11. It might be easier if you showed the raw, html output (source) of this page. We don't have access to your database/data. If we had the raw output it would be a lot easier to troubleshoot the jQuery.
  12. You're not adding a query string. You're just adding a variable FROM the query string as the last segment.
  13. @shiftoii They were discussing javascript, not JAVA, which is a totally different language.
  14. Barand has a better solution, but mine was something like: $count = 0; //keep track of where we are in the array $separate = 4; //number of entries before new ul echo '<ul>'; while($row = $results->fetch(PDO::FETCH_ASSOC)) { //If we hit $separate by checking modulus operator, close ul and start a new one if ($x%$separate == 0) { echo '</ul><ul>'; } //output li's echo '<li>Mileage: '.number_format($row["Mileage"]).'</li>'; echo '<li>Engine size: '.$row["EngineSize"].'cc</li>'; //increment counter $count++; } echo '</ul>';
  15. Create a counter before the loop, and increment it by one just before the end of the loop and check the counter within the loop to process differently? Hard to say with the information provided.
  16. Probably due to name recognition from years of watching their TV ads.
  17. Probably because you have a trailing slash in the RewriteCondition
  18. The best thing you can do to speed up queries is to have the fields that are being JOINed ON, ORDERed BY, GROUPed BY, or used in a WHERE, properly indexed. Also learning to use EXPLAIN will help see where the bottlenecks are. http://www.sitepoint.com/optimizing-mysql-indexes/
  19. Since $files is an array, $i should start at 0, not 1 in the for() loop. You're skipping the first image. Please also note that the mysql extension is deprecated, meaning it will no longer be available in php in the future. If you want to write code that will work on future versions of php without having to rewrite all of your queries, it's highly suggested you use the PDO or mysqli extension.
  20. It's most likely on your server but just not enabled. Look in your php.ini in the extensions section and look for ;extension=php_mysqli.so (or .dll if windows) remove the ; from the front of the line and restart apache.
  21. I'm honored! Thank you!
  22. Is the js console showing the ajax request firing? Are you sure that data is being returned in the success event?
  23. I believe your data is correct. An order can have many products, correct? What you'd need to do is in your loop when you are outputting the data, check to see if the order_id is the same as the last order_id, if not display the order_id, if so it's part of the same order and output a in the <td>. You'd probably want to ORDER your query by (orders.order_id, orders.company_id, orders.order_for) some pseudocode: $last_order_id = null; //store the last order_id while($row = $query->fetch_array()) { //check to see if this is a new order or part of the same one if ($row['order_id'] != $last_order_id) { //nope, it's a new order, store as $last_order_id and output the order_id $last_order_id = $row['order_id']; echo '<td>' . $row['order_id'] . '</td>'; } else { //it's part of the same order, output a space for this td echo '<td> </td>'; } } You'd need to do the same thing for anything else you don't want to repeat
  24. Check the docs for your plugin. There is a callback function that executes after the animation has completed. That's the only way you'd be able to know when it completes.
  25. And what does that tell you? You have a syntax error on line 10 (hint, usually the error is on that line, or the one right before it).
×
×
  • 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.