Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. 1 - use the code tags as described in the forum's rules. They are the little <> icon in the editor menu or simply code and /code wrapped in brackets. 2 - you can't compare a string (which $end is) to a date value (which $now is). Try: $end = strtotime('04:15:00 PM'); 3 - your table names are dates? Really? There may be more but those two things are a start
  2. What is that last 'thing' in your query statement? I've never seen an index like that! Try adding a test of your query result - I find it hard to believe that your query is actually producing anything.
  3. What is the outbounding box? You have a set of image dims; you have the dims of the text box from above. What is this 'outbounding box'? It would seem that the height of your text box is simply index 7 less index 1 since you have a square text box (angle=0?). Then you have the vertical midpoint of your image already, so half of the text box height from that midpoint is the starting point for your text box, no? I've never done this but from reading the manual just now, it seems simple. Can you show us more of your code, specifically how you display the text?
  4. Do you really think WE can figure out what YOU are doing with this code? What do the values you are supplying represent? And what do you do with the value you arrive at? More importantly, once you have this "height" value, how do you decide where to place the element? So much missing...
  5. THAT'S BECAUSE YOU HAVEN'T LISTENED TO ME! You have to add a line after the query checking it for an error. (run the query) $result = mysqli_query($con,$query); (test the query ran) if (!$result) { echo "Query failed to run - error message is: ".MySQL_error(); exit(); } // now fetch the results since YOU ARE SURE it ran ok
  6. I believe you have to say it longhand : Price <= $maxprice and Price >= $minprice
  7. Your where clause is close. Don't you want to check <= maxprice and >= minprice? Anyway - you need to add a check of your query execution before attempting to read the results. look up MySQL_error() function
  8. I think I just need to see where you build your query statement and run your query
  9. The connect is nothing. It's the query that you have to verify so you know whether you made a mistake in it.
  10. ooops! I mis-read the error message earlier. IT means that you didn't check the results of you query run before trying to fetch a record. If you had (or if you had error checking turned on!) you would have read a message and aborted. Turn on error checking. And add a check on whether the queryresults var is false or not. False is bad - show the error message from MySQL_error (?)
  11. It means that all of the MySQL_* functions are being removed from php in the near (very?) future. It's listed in the manual for every function and many, many forum posts make the suggestion to newbies to move away from MySQL_query and the like. The way to go is PDO or mysqlI if you have to. Heed the warning and learn a new set of functions.
  12. Yes you can! Just thought you might not be up for it yet. just type: where price >= $minprice and price <= $maxprice at the end.
  13. you need a where clause at the end to compare price to the min & max prices values you have. Do a search on sql joins.
  14. Program much? Cause you have some pretty bad logic errors here. You initialize your friends array every iteration of your while loop. Therefore you will never get a hit in your check for dupes. You really should combine your second query with the first one (which you didn't show us) and avoid this coding completely.
  15. IMHO - you don't understand css at all. Twelve Hundred Lines? Are you f.... kidding me?
  16. Since there isn't even an h1 tag in this code, you haven't helped us out much. Nor did you show us much css. good luck.
  17. uhhhhhhhh..... bad code perhaps? Of course we have no code to look at, so how many guesses do we get?
  18. Why do you have code to create a database but then try to insert a record in a non-existent table? Why do you stripslashes on your input values? Why do you expect slashes in the input?
  19. Way too much code to look at. How about just showing us the part where the clicked link runs the INSERT code? And then where the show link does the select query and builds the output?
  20. my code comes thru badly on this editor as well.
  21. Perhaps this google result is what you want: http://stackoverflow.com/questions/9559032/how-to-download-a-file-from-server-with-a-button-click
  22. 1 - USE CODE TAGS per the forum's rules. 2 - learn how to use css and stop using it wildly and needlessly. 3 - then show us the PHP code that you are using since that is where your question really lies, not in the html. BTW - here is a cleaned up version of your html from above. Had to do it. It was horrible. sign-up form (?) <html> <head> <style type="text/css"> body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } .style5 { font-size: 16px; font-weight: bold; } </style> </head> <body> <form name="form1" method="post" action="email-activation-script.php"> <div> <center> <p class="style5"> Form Registration </p> <table width="35%" border="0"> <tr> <td class='style7'>Username</td> <td class="style7">:</td> <td class="style7"> <input name="username" type="text"> </td> </tr> <tr> <td class="style7">Email</td> <td class="style7">:</td> <td class="style7"> <input name="email" type="text"> </td> </tr> <tr> <td class="style7">Password</td> <td class="style7">:</td> <td class="style7"> <input name="password" type="password"> </td> </tr> <tr> <td> </td> <td> </td> <td class="style7"> <input type="submit" name="Submit" value="Register"> <input type="reset" name="Submit2" value="Cancel"> </td> </tr> </table> </center> </div> </form> activation form(?): <form name="form1" method="post" action="check-activation-script.php"> <div> <center> <table width="35%" border="0"> <tr> <td>Username</td> <td>:</td> <td> <input name="username" type="text"> </td> </tr> <tr> <td>Activation Code </td> <td>:</td> <td><input name="activation_code" type="text"></td> </tr> <tr> <td> </td> <td> </td> <td> <input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Cancel"> </td> </tr> </table> </center> </div> </form> Took out the extra span tags and the un-used label tags. Cleaned up your css and re-defined some of it. Now let's get to your php code - hopefully it is in better shape than you html/css is
  23. I don't get your script. First you call your function to dump all the files in the specified directory and sub-directories of it. Then you open a different directory and dump the filenames and dirnames in that ONE folder. And - is this a sample of your upload process or is that a completely separate process that doesn't need mentioning here? (Plus - you have a typo in this code that s/b giving you an error, if you have error checking turned on properly.) As for your question - I am assuming that you have a user logged in who has a session var that indicates such and you want to tie that user to a group of files so you can only show him 'his files'. If so - you have to do something to make that connection during the upload. How are you envisioning that? Does your upload process only allow them to put files in one place, based on their login value? Does your upload process create an entry in a db table to record what files each user uploads? To answer your question - I would say yes you can do this but it's not done by magic - you have to create something to make it possible.
  24. HTH! Glad you understand what I did - it is good to keep the logic away from the presentation as much as possible. PS - I hope you are doing an error check on the connection in that included code and not doing it as you did in your last posted sample. Check that the connection worked when you do the connect, and check that the query works when you do the query.
  25. oops. Change the line $options to: <? echo $options; ?> NOTE: just added a semi to the line above!
×
×
  • 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.