Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. quizzes (quiz_id, ..) quizzes_questions (question_id, quiz_id, ..) quizzes_answers (answer_id, question_id, ..)
  2. <form method="POST" action="#"> <input name="data1" size="50" value="<?php print isset($_POST['data1']) ? $_POST['data1'] : '' ?>"> <input type="submit" name="prv" value="Preview"> </form> <?php if (isset($_POST['Preview'])) { echo '<div style="width: 500px; height: 500px; overflow: scroll">', applyTemplate($_POST['data1']), '</div>'; } if (isset($_POST['submit'])) { //submit } You don't need session's to create a preview just make sure to auto-populate the form fields.
  3. ignace

    Help, how.

    You are correct, the same applies for the negative column.
  4. It would be best to use a intermediary table, like: products (product_id, product_name, ..) products_sizes (size_id, size_label, ..) products_has_sizes (product_id, size_id, quantity) -- <-- intermediary table Retrieve all sizes for a certain product: SELECT products.product_id, products.product_name, sizes.size_name, products_has_sizes.quantity FROM products_has_sizes JOIN products USING (product_id) JOIN sizes USING (size_id) class Store { public function fetchAll() { $query = 'SELECT products.product_id, products.product_name, sizes.size_id, sizes.size_name, products_has_sizes.quantity' . ' FROM products_has_sizes JOIN products USING (product_id) JOIN sizes USING (size_id)'; $result = array(); foreach ($this->db->fetchAll($query) as $row) { $product = new Product(); $product->setId($row['product_id']); $product->setName($row['product_name']); $size = new ProductSize(); $size->setId($row['size_id']); $size->setName($row['size_name']); $product->addSize($size, $row['quantity']); $result[] = $product; } return $result; } } $dao = new Store(); foreach ($dao->fetchAll() as $product) { echo $product->getName(), ' (', $product->getQuantity($product->getSize()), 'x', $product->getSize(), ")<br>\n"; }
  5. When I mentioned a virtual-client I did not refer to a virtual host these are 2 different things. With a virtual-client I meant a program like VirtualBox which allows you to run an exact copy of your server including it's OS.
  6. This website has other problems then the one's you mentioned, accessibility & usability being among those.
  7. It should be SELECT `url` FROM `websites` WHERE `userid` = '$userid' AND `url` = '$url'
  8. http://en.wikipedia.org/wiki/Post/Redirect/Get
  9. You could let the user copy-paste http://www.dev.domain.com/ and then using crawling techniques you would find internal links and using DomDocument you can then output it as XML.
  10. What is your intention with unset? To delete the rows from your database?
  11. What is not working? What is the current output? And what is the desired output?
  12. Like I said you should use set_include_path on Windows platform's the use of ini_set('include_path') does not seem to work (it never did for me and I am not sure about Linux) either way try it
  13. You should use set_include_path. Instead of uploading everything to the production server it would be best to run an exact copy of your production server in a virtual-client so that you can correct any error's and not the entire world can see you correct these error's.
  14. You can increase the count by altering max_file_uploads cf http://www.php.net/manual/en/ini.core.php#ini.max-file-uploads Chances are you also may want to increase upload_max_filesize with 8M you would have 200KB for each file.
  15. I am no expert in CSS and have actually no idea what the browser applied CSS-rules are for the <legend>-tag but I tried and worked: <fieldset> <legend style="display: block; float: left; margin-top: -17px; background-color: #FFF; padding: 0 5px;">test</legend> <div style="display: block; float: right; margin-top: -17px; background-color: #FFF; padding: 0 5px;">test</div> test </fieldset> If you use a reset script (cf Eric Meyer) you'll notice the <legend>-tag is no longer where it used to be. It's quite possible the browser uses background-color: inherit for the <legend>-tag to animate no line under the tag itself from the <fieldset>.
  16. $secondFriday = strtotime('second friday'); $lastWednesday = strtotime('last wednesday'); For more info see: http://www.php.net/manual/en/datetime.formats.relative.php
  17. <sarcasm>Oh sorry, I didn't notice that in your very detailed description of your problem</sarcasm> Try that: <button onclick="document.addtocart.submit()" style="background-color:#3355CA; color:#FFFFFF; font-weight:bold; font-size:12px; padding-bottom:2px;">Add To Cart</button>
  18. Unless you use the directives auto_prepend_file or auto_append_file php_value auto_prepend_file "includes/functions.php" http://php.net/manual/en/ini.core.php -- scroll down to data handling
  19. What amazes me is that you ask this question while you could have just read the DTD@http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Strict or validate it using your IDE or W3 validator. And what's a <legend>-tag? Nothing special just a tag with some default style applied to, you can use any tag you like (as many times you like, or one with the accesskey attribute if you want to maintain accessibility). Or for semantics sake, you could write: <fieldset> <legend class="legend left">..</legend> <div class="legend center">..</div> <div class="legend right">..</div> .. </fieldset>
  20. LOL It should be: <button type="submit" style="background-color:#3355CA; color:#FFFFFF; font-weight:bold; font-size:12px; padding-bottom:2px;">Add To Cart</button>
  21. Add readonly="readonly" However anyone with FF and Firebug can alter it's contents, and JS can be blocked. Never trust the client.
  22. I can already tell you your solution is going to be faster but a hell to maintain if they push through changes. Find a balance that works between a normalized and de-normalized structure
  23. The reason we advice this is to avoid an UPDATE anomaly. For example you have 3 fields: number1, number2, and total where total is the sum of number1 and number2. Now imagine I update number1 or number2 or both, total wouldn't be so accurate anymore.
×
×
  • 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.