Jump to content

mike12255

Members
  • Posts

    439
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by mike12255

  1. i did that and i got the query that i qouted above
  2. so you basically want to select all of the information from the record where the lastupdated field equals the same date as the current day?
  3. Im trying to figure out if a user has already downloaded something so im seeing if they have a uid (user id) in the database along with the nid (note id) that they are trying to download. I echoed out the sql and it returned this: i manually ran that sql in phpmyadmin and it returned a couple rows. However my var $rows = mysql_num_rows($res2) has no value when i echo is out. Appriciate any help here is my code: <?php $sql2 = "SELECT * FROM purchases WHERE uid =".$user_id." AND nid =".$id; $res2 = mysql_query($sql2) or die (mysql_error()); $rows = mysql_num_rows($res2); ?>
  4. managemember() <-- this will be a function made from whoever made that script. You will need to find that function and edit its sql statement that changes person to a moderater.
  5. Hey guys I cant seem to find this error guess ive been looking at this screen to long to try and get this project done in time would appriciate if someone could take a fresh look at it and tell me where I went wrong. Basically im trying to get the number of entries returned by my query. I echoed out the query and manually entered it into phpmyadmin there is a 1 row result however whenever i kill $num_result it doesnt give me any output. <?php public function getNewMessages() { global $db,$db_table_prefix; $sql = "SELECT * FROM messages WHERE `to_id` = '".$db->sql_escape($this->user_id)."' AND `read` = 0"; $res = mysql_query($sql) or die (mysql_error()); $num_rows = mysql_num_rows($res); die ($num_rows); // does not return a value return $num_rows; } ?>
  6. $query=mysql_query("SELECT * FROM users WHERE username='$username'") or die (mysql_error()); lets see what error it gives you, if any. Also do you understand that in location the text has to exactly look like this spaces and all or it will return 0: England, Japan, Colombia, USA, Russia, Italy, Turkey
  7. Because I dont have time to look through your code ill just type a quick example.: <?php $query = "SELECT * FROM customer_info"; $res = mysql_query($query); $row = mysql_fetch_array($res); echo "<input type=\"text\" name=\"name\" value=\"".$row['name']."\" />"; echo "<input type=\"text\" name=\"adress\" value=\"".$row['adress']."\" />"; ?> understand?
  8. Thanks, guess what I should start doing is looking for a simple word->pdf converter that does not involve phplivedocx so i dont have to sign up for zend because I cant afford it.
  9. Ok, so basically someone submits a file (doc) and I need to see if it is the same as another file. So instead of opening 300+ files and checking for word similarity, I put the file info into a table called newnotes. Then check the file size for each of the notes in "newnotes" against all of the notes in the table "approvednotes" this could be something like matching 20 file sizes to 300+ file sizes. The user gets returned back to a page and this is all done in backend by the click of a button the admins can use. But would doing this slow down my server/website?
  10. Damn I have no idea what to do then, cause if people can cheat, they will and the site will fail.
  11. I feel the only true safe way for me to do this is by letting the user view the note on the website (with copy and past disabled) and have an option to print the note.
  12. is it inside a <form> if it is, then the variable for it once the forum is sent would be $_POST['quantity']
  13. good call, dont know how I missed it.
  14. oops, try loosing the /jpeg and i beleive it should work.
  15. $query = " INSERT INTO ".$QA_table." (SUB_CATEGORY, QUESTION, FROM, FROM_EMAIL, DISPLAY) VALUES ('$sub_cat','$message','$from','$from_email','2')"; $res = mysql_query($query) or die (mysql_error());
  16. try this: $q = "SELECT customer_fname, customer_message FROM customer_messages WHERE flag = 0";
  17. if (($ext == "jpg") ||($ext == "gif") || ($ext == "png") && ($_FILES["uploaded_file"]["type"] == "image/jpeg") && ($_FILES["uploaded_file"]["size"] < 600000)) { you can view information on php's or (||) operator here you should learn all of the operators before starting to code.
  18. I can be sure what you are looking for, but I think its something like this: <?php $queury = "SELECT * FROM test"; $res = mysq_query($query) or die (mysql_error()) while ($row = mysql_fetch_array($res)){ echo "<option value = $row['id']>".$row['name']."</option"; } ?>
  19. I htought this too. But you figure Im hoping to have atleast 300+ users using this. so at 300 notes to add one ontop of all the current functions it has to go through and read 300 pages, will majorly slow it down I need to think of a faster but still appropriate method.
  20. try posted the code on here and telling us what your error is unless we have those two things we cannot help you, sorry.
  21. You are looking for GeoIP classes and there are several free ones out there, here are two: http://ip-to-country.webhosting.info/ http://www.maxmind.com/app/geoip_country
  22. if he did: 2. use .htaccess to restrict the folder to `deny from all` would he still be able to use it via the include function?
  23. Question One: <?php $username = $_GET['user']; echo "<input type=\"text\" name=\"username\" value\"".$username."\"/>"; ?> Dont quite understand question two sorry. I think your asking to pass the login credentials through the URL and have it auto login the user. This is very unsafe and in my opinion stupid (no offence) most passwords in databases are encrypted ($pass = md5($pass)) so that there would be no way to know what the actually password it because the only way to have pass equal the md5 is by typing in the right password.
×
×
  • 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.