Jump to content

fugix

Members
  • Posts

    1,483
  • Joined

  • Last visited

Everything posted by fugix

  1. i either use bluefish or gedit, leaning more towards gedit now though
  2. Wow that is pretty amazing code right there compared to mine. I'm obviously starting out but oneday I want to code as well as you can. A few of those errors were merely stupid mistakes. I'm using a school laptop that can't run php or test it, so I practically use notepad without testing. stupid mistakes happen to all of us so dont worry, you will learn alot more as you progress...just stick with it!
  3. Sure, it might not be harder to make... but are you using the right tool for the job? I might be able to hit a nail in with a screwdriver, but was it really the best way to do it? Like
  4. yeah, i casually play and im still pretty ticked off about what happened
  5. your question is unclear to me, so you are having trouble creating a query to do what?
  6. well your header syntax is correct...so am i correct in saying that it is trying to redirect but it just isnt working? have you tried it on another browser?
  7. Looks to me like your preg_match_all() is set to grab everything in between of the div tags. What us it returning?
  8. if your state is coming from the form, wouldnt you need to have $_POST['state']; set up? i dont see if in your php code
  9. yeah thats what it was, had a whitespace before my lastnames....nice pikachu...thanks guys for your help
  10. thus far i only used echo, i will try var_dump() as well
  11. thats the thing, i have already done that and $substr is the same as $row['first_name'], and the same for the second set...thats why im so confused...they are the same but for some reason its not passing the if statement.
  12. i really need to memorize the reserved words.. :-\
  13. where in your code is you $state var specified?
  14. for my id field, it doesnt get past the if statement, so in there is where the error is
  15. okay, write this onto your query mysql_query("INSERT INTO partners (desc,photopath,state) VALUES ('$desc','$path','$state')") or die(mysql_error()); and tell me what happens
  16. it will increment yeah, but if you dont call it out in your query, your query will fail
  17. if you have an id field, you must also call it out in your query mysql_query("INSERT INTO partners (id,desc,photopath,state) VALUES ('', '$desc','$path','$state')");
  18. hey guys, i have my code set up to run substrings through a db to check for matches...even when there is a match it wont insert correctly $result = mysql_query("select * from friends where userid=$userid"); while($row = mysql_fetch_assoc($result)) { $first_name = $row['first_name']; $last_name = $row['last_name']; $strpos_1 = strpos($friend_1, ' '); $substr_1 = substr($friend_1, 0, $strpos_1); $substr_2 = substr($friend_1, $strpos_1); if($substr_1 == $first_name && $substr_2 == $last_name) { $sql = "insert into fav_friends values('', '$userid', '$friend_1', '$friend_2', '$friend_3', '$friend_4', '$friend_5', '$friend_6')"; $query = mysql_query($sql); } } and i don't receive any errors, any thoughts?
  19. what errors do you receive..do you have an auto incrementing id field of some sort?
  20. yes, what is the purpose of the code that you posted mod-jay?
  21. and can i ask why you want to do it without using loops? loops is the easiest way
×
×
  • 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.