Jump to content

imgrooot

Members
  • Posts

    383
  • Joined

  • Last visited

  • Days Won

    1

Community Answers

  1. imgrooot's post in Is it better to use to id or actual name when relating to another table in MySQL database? was marked as the answer   
    Got ya. Thanks.
  2. imgrooot's post in How do you show php foreach loop results as ajax mousehover? was marked as the answer   
    Yep the above works if I have the ".show-details" div as a child of parent div ".product" like this.
    <div class="product"> <div class="product-title"> <?php echo $get_record_title; ?> </div> <div class="product-price"> <?php echo $get_record_price; ?> </div> <div class="show-details"> <?php echo $get_record_details; ?> </div> </div>
  3. imgrooot's post in Uploading an image gives me move_upload_file error was marked as the answer   
    Your comment made me think of something.  So I added this code and now it works.
    if(!is_dir($target_dir)){ mkdir($target_dir, 0775, true); }
  4. imgrooot's post in How would you add form input values array into multiple rows in MySQL table? was marked as the answer   
    Alright so I have it working now.  For future reference, here's the entire code based on what "benanamen" wrote.
    // get record id from url parameter $record_id = $_GET['record_id']; if(isset($_POST['submit']) { $insertStmt = $db->prepare("INSERT INTO datatable (record_id, title, description) VALUES (?,?,?)"); for ($i = 0; $i < count($_POST['title']); $i++) { $insertStmt->execute(array( $record_id, $_POST['title'][$i], $_POST['description'][$i] )); if($insertStmt == true) { echo 'success'; } else { echo 'false'; } } } <form action="" method="post"> <input type="text" name="title[]" value="" /> <input type="text" name="title[]" value="" /> <input type="text" name="description[]" value="" /> <input type="text" name="description[]" value="" /> <input type="submit" name="submit" value="Post" /> </form>
  5. imgrooot's post in I have a javascript countdown timer but would like to know how to add a cookie to it was marked as the answer   
    Can you please double check your above code?  It's giving me an error "ReferenceError: Timer is not defined".
    Which is this line.
    new Timer($('.<?php echo $counterName; ?>'), <?php echo $timeLeft; ?>);
×
×
  • 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.