Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. Think you should focus on making your script work first. did you put quotes around your included files? include "clientconnect.php"; include "newclient.html"; If you did, and everything is now working, then instead of using $_POST['blah'] in your query, do this (for each one): $blah = mysql_real_escape_string($_POST['blah']); $sql = "insert into table (blah) values ('$blah')";
  2. so that codeblock didn't work? As in...it's still producing the original file, as if time() were just ""?
  3. you mean other than the fact that you don't have quotes around your included files, and that you are putting posted variables directly into your database without sanitizing them?
  4. QFT EXACTLY.
  5. Well that was the point. I needed to see what to work with. You do want to rename 8_5_12[1].gif to something else right? $temp = explode(".", $userImage); $temp[0] .= time(); $userImage = implode(".", $temp);
  6. It also tells you to stand up and do the wave. It's just...not so popular, cuz you know, most people are at the computer by themself and a one man wave is pretty weaksauce. I still do it though...
  7. Oh come on now, do you really think that that one line before it that has no actual code is going to be in any way useful to figuring out the problem?
  8. echo $userImage; should do the trick. If it's not echoing anything, then I don't think that renaming your file is what you should be worrying about right now..
  9. Does the id have to be numeric? Here's a simple method of generating a 6 char unique id that has no apparent sequential order: $id = substr(md5(time()), 0, 6);
  10. yes it is possible. But I think it would be easier on you if you showed your code and where you're having issues in it.
  11. 2nd post and you're already posting in the wrong forum...I wonder if failure to read the forum descriptions and stickies is any indication of why you got booted from the other community you were at.
  12. echo out $userImage to give an example of what it looks like.
  13. There's no reason why your original code shouldn't work, syntactically. If your query works without the column/value then there's something wrong with the query string itself that sql doesn't like. A good way to figure out if your query string is correct is to separate the string from the query so you can echo out what's being sent to the db. Also, adding some error reporting is helpful: $sql = "INSERT INTO `hope` (fname, lname, idnum, gradyear, donor) VALUES ('$_POST[fname]','$_POST[lname]','$_POST[idnum]','$_POST[gradyear]','$donor')"; mysql_query($sql) or die("$sql <br />" . mysql_error());
  14. please post the code around that line
  15. http://www.php.net/rename
  16. You're going to have to be a bit more specific, and also show us some code. I think you're saying you have two tables and you want them both to hold the same info, so if someone has never filled out either of the forms, it will insert the info into both tables, but if someone has filled out one but not the other, it only inserts into one table? If that is what you're saying, then I think you're going about this all wrong. First off, why do you need two different tables that hold the exact same information? And if for some reason you just *need* to have two tables with the same information (which seriously, I can't think of a reason why you would), just have it insert the data into both tables no matter which form is filled out, to begin with. That solves the whole "if one filled but not the other" scenario...unless you have "grandfathered" people already in one or the other table and your making this whole new system and you want to be able to accommodate that. But if that's what you are doing, why not just force everybody to refill one of it out? Problem solved. Or just make a quick script to copy the info from 1 to the other - problem solved. As far as this: Again, we aren't in your situation, so that doesn't really mean a whole lot to us. You're going to have to get a lot more detailed about your question and situation.
  17. I think I've been to kirupa.com more than any other place when it came to flash
  18. if you're doing it line by line you could use file() instead of file_get_contents. That will read your entire file and put it into an array (one line per element) instead of a giant string like what file_get_contents does. Then you can array_reverse the array and loop through it.
  19. That's poor and sloppy code for querying the database for an entire row(s) from your database where the username and id in the row equal $username and $id and then putting the results into an array $account. Since mysql_fetch_array isn't looped, even if there's more than 1 row returned, $account will only have the first row in the list returned. To access the info returned, you would do for instance echo $account['username']; // echoes the username echo $account['id']; // echoes the id echo $account['columnname']; // replace columnname with whatever other column is in your table
  20. $db is not being instantiated. Where do you instantiate it?
  21. Well if you decided to package and distribute your application, you're going to limit yourself to other windows users. That doesn't sound so bad, considering most people use windows, but when you consider what type of person would use your application, chances of them not using windows significantly increases..
  22. Based on that info, you probably should be able to. Hook up your monitor, rightclick somewhere on your desktop properties > settings > advanced > monitor You may find some options for using both laptop monitor and plug and play monitor. Or look at the sub-menus from there. That's about the best I can do without having your laptop sitting in front of me.
  23. Hey guys no need to fight. stelthius isn't necessarily lying; as he said, what's the point in lying about it? He may simply not know and he's just assuming it's not installed because he didn't go install it. But nonetheless, stelthius, the following: ImageCreateTrueColor ImageColorAllocate ImageFill ImageFilledArc ImageFilledRectangle ImageFontHeight ImageString ImageSX ImageSY ImageCopyResampled ImageDestroy ImageJPEG are in your script. Those are all functions of the GD library, so you somehow do indeed have the GD library installed and enabled on your system. You had to have installed apache/php or maybe a package like WAMP or XAMPP or something, maybe it came with the bundle. Who knows? But the bottom line is that you do have it installed, because your script wouldn't run without it. Check out what the GD library has to offer, in the way of doing what you want.
  24. Maybe... considering we have no idea what kind of laptop/OS/everything else you have...there's no way we can give you an answer...
  25. Are you using some special library or 3rd party script to generate that?
×
×
  • 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.