Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. you can't update with an order. Explain what you're trying to do. You want to order them and then increment the order or something? I think you'd have to do this in PHP with many queries.
  2. and you don't get an error? If you look at the manual it says that means there was an error. Try just printing the odbc_errormsg after the query.
  3. You have the or die() in the wrong set of parenthesis (and I think one too many?). Seperate this all out until you know what it's doing better. What you have looks like this: $ex = odbc_exec($php121db,"select * from UserMaster where uname='$username' and password='$password'"); $chk=odbc_num_rows($ex) or die(odbc_errormsg(); You want: $ex = odbc_exec($php121db,"select * from UserMaster where uname='$username' and password='$password'") or die(odbc_errormsg(); $chk=odbc_num_rows($ex) Also, read the article in my signature called how to ask questions - your title doesn't say anything about the problem...
  4. for($i=1; $i<=10; $i++){ if(isset($_FILES['imagefile'.$i]['tmp_name'])){ //etc. } }
  5. wow, burn. I'm glad you're okay, unless it was your fault, in which case you're an ass. I hate drivers. You know I rode my bike to school today in the 32 degrees and some asshole thought it was funny to honk at me. I've given up trying to exercise my lawful right to the right lane, and I just ride on the sidewalk, cause all texas drivers are assholes. ASSHOLES. It doesn't look like your roll bars actually did much :/
  6. $foo = $_SESSION['foo']; print_r($foo->a); Just like you normally would
  7. as several people said, sum will return all of them added together. count() is what you want. SELECT count(helmet) AS helmet_count
  8. Are you trying to let them select between multiple characters? Each one should have a unique ID, and you'd use the ID as the value.
  9. $sub = substr($string, strpos($string, 'search'));
  10. like omg, did you lk, fnd 0ut if it wuz wind0z r linx?
  11. I know what you're talking about, but I don't understand the problem? What is your problem with the gaps and duplicate numbers? I usually loop through the results of the user's ordering and assign them into an array, so that removes the gaps/dupes.
  12. Is there a simple function to remove whitespace from the front and end of a string? Can't find one in the docs... Edit: Today is my day for finding my own answers function LTrim( value ) { var re = /\s*((\S+\s*)*)/; return value.replace(re, "$1"); } // Removes ending whitespaces function RTrim( value ) { var re = /((\s*\S+)*)\s*/; return value.replace(re, "$1"); } // Removes leading and ending whitespaces function trim( value ) { return LTrim(RTrim(value)); }
  13. if you're using resampled and not resized, it shouldn't do that. Can you post your new code?
  14. It's very easy to resize any type of images - there are lots of already made scripts and tutorials out there.
  15. It looks like it's the quality being reduced. Use this instead http://us3.php.net/manual/en/function.imagecopyresampled.php
  16. The easiest way to find out the answer to a question like this is to try it. Yes.
  17. That sounds odd. Can you show us an example image? Does it happen with gif or png too?
  18. Yes. Use the php function for the database, not addslashes(). If you're using mysql, use mysql_real_escape_string(). If you have magic_quotes_gpc on, you should first stripslashes as it adds its own.
  19. If you'd spent half as much time actually programming and really thinking about what you were trying to do as you spent: thinking up a name, getting the domain, finding a template (you're supposed to be a designer, yet you always use templates, sure), writing up all your copyright and usage bullshit, setting up a forum and making posts in it, thinking of ways that other people can help, and posting about it HERE - it might actually be worth pursuing. If it actually were that simple, a lot more people would have thought of it. People reuse code all the time, that doesn't mean it's worth making a "click to install" type of interface for every little thing you do. It's a waste of time. You have to weigh the cost of development vs the benefits. I can't see why anyone would want to make it easier for themselves to "install" any of your code, but I guess somehow you've convinced some of your "clients". But it looks like you don't actually write much code for them anyways, from the looks of your portfolio. Template, third-party chat, third-party blog, more templates, more templates, paypal shopping cart, template, third party, wee. Perhaps you should stick to installing other OS projects for now.
  20. Good point. But yeah, I don't see any reason to use regexp here, since the built in function is likely faster or more efficient or something. Or I just want to be right
  21. http://us3.php.net/manual/en/function.substr-count.php They don't want to replace them, just count them.
  22. did you try printing the query before running it to see if the problem is PHP or sql?
  23. "Godaddy has the world's worst support system." I hate to bump this, but GoDaddy has the BEST support of any host I have ever used. They have 24 hour phone support, and in the 3 years I've been using them I have never had it take more than one short call to get a problem fixed. How are you having trouble getting support from them?
  24. didn't we just do this? $submitfile_name = str_replace("'", "", stripslashes($submitfile_name));
×
×
  • 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.