Jump to content

J.Daniels

Members
  • Posts

    143
  • Joined

  • Last visited

    Never

Everything posted by J.Daniels

  1. View the page source and see what the value of $get2->image is. Is the path to the image correct??
  2. $this is a reference to the calling object in OOP. http://us.php.net/manual/en/language.oop5.basic.php
  3. I was actually referring to the date field and the value type stored there. If date is a date field and it is the current day, it will evaluate to less than NOW()
  4. It's possible there is a problem with the query. To check the query: $result = mysql_query($query) or trigger_error('SQL Failed', E_USER_ERROR); Also, you might have an empty result set. Try echoing out the number of rows returned: echo mysql_num_rows($result);
  5. You have a semi-colon at the end of line 50 <TEXTAREA name="music", ROWS="5", COLS="45", wrap=virtual>' . $music . '</TEXTAREA>
  6. You added a second echo inside the first echo <TEXTAREA name="music", ROWS="1", COLS="30", wrap=virtual>$music</TEXTAREA><br> <TEXTAREA name="music", ROWS="5", COLS="45", wrap=virtual>' . $music . '</TEXTAREA> <br>
  7. There may be a problem with the query, which then returns false. Check to see if there is an error. $result = mysqli_query($conn, "SELECT num, fname, lname, dep, desc, recp, time, date FROM tickets WHERE date = '$currentDate' AND time = '$lastHour'") or die("Error: ".$conn->error);
  8. I believe you need to check the value of date. NOW() returns the current date and time. If the value of date only holds the date, I'm not sure if the compare will fail as date might refer to 12:00 am, which would be before NOW(). Maybe you can try to compare date to CURDATE().
  9. Are you trying to sort by the name, value, or a combination of both? I don't see a logical sort to your desired output.
  10. echo "<INPUT TYPE=SUBMIT VALUE='Submit CR' onClick=\"return confirm('Changing an existing')\">";
  11. Take out the for loop and add a counter: <?php $count = 0; while($row = mysql_fetch_array($query)) { echo '<table>'; $class = $count%2 == 0? 'odd':'even'; echo "<tr class='" . $class . "' ><td>"; echo $row['datetime']; echo "</td><td>"; echo $row['month']; echo "</td><td>"; echo $row['year']; echo "</td><td>"; echo $row['client']; echo "</td><td>"; echo $row['surveys']; echo "</td><td>"; echo $row['airtests']; echo "</td><td>"; echo $row['project']; echo "</td><td>"; echo $row['bulks']; echo "</td></tr>"; echo "</table>"; $count++; }
  12. Since you are not creating a MySQLi object, you will need to use mysql_query() instead of mysqli_query().
  13. SELECT SUM(number) as sum FROM table WHERE id=1
  14. Is register_globals on?? Try changing $id to $_GET['id']
  15. $sql = "DELETE FROM flash WHERE id=$id"; Where are you setting $id? You can echo out $id to check it's value to make sure it is what you are expecting.
  16. You need to return the category field: SELECT COUNT(*) cnt, category FROM videos GROUP BY category;
  17. You can try to LEFT JOIN your response table and find any question ids that are null. SELECT q.id, q.question FROM questions q LEFT JOIN response r on q.id=r.question_id WHERE r.user=22 AND r.question_id is NULL ORDER BY q.priority
  18. foreach($HTTP_GET_VARS as $key => $val) { Assuming that $path is a variable passed in the url, $HTTP_GET_VARS is depreciated as a superglobal. Try changing that to $_GET.
  19. You want to append to the innerHTML element.innerHTML = element.innerHTML + <code to add 2 more input fields>;
  20. PHP has a few sort functions for arrays. sort() usort() So you can just populate your array, then sort it and take the first 10. If you are pulling the records from a database, you can use the database functions to return and sort your data.
  21. If the path is correct, check the permission on the directory. The server needs to be able to write to it either by owning the directory or CHMOD needs to be set to 777
  22. You will have to create a PHP function that returns the same value as getDays()
  23. PHP is a server side language and Javascript is client side. The PHP script will not get the return value of getDays().
  24. You can enter data into the database in any order. For example: INSERT INTO table (table1, table2) VALUES ('table1value', 'table2value'); is the same as: INSERT INTO table (table2, table1) VALUES ('table2value', 'table1value'); What I would be focusing on is what is causing the script to timeout or fail. ie. which out of the 10 records is failing and why
×
×
  • 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.