Jump to content

Jessica

Staff Alumni
  • Posts

    8,968
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Jessica

  1. Where do you see ASP? Just curious.
  2. Use sessions, not cookies. Cookies can be edited.
  3. Which is exactly what I wrote :-P
  4. If it's a select (a drop down), make the id the value of the option element.
  5. First of all, use $_POST or $_GET, not $_REQUEST. Secondly, use a foreach(). Edit: wtf is flipping? foreach($_POST AS $key=>$value){ $_SESSION['key'] = $value; }
  6. I think it's because You're not inserting a date, so it inserted 0 on the first one. Now it can't because 0 is already taken, it's not unique. Insert the date also.
  7. "That is why windows is 90% in the desktop market" ROTF! Windows is so huge because it's what COMES on the computers. Walk into ANY store that sells computers and see how many have something besides Windows. Most consumers don't even KNOW there are other options for PC. They think it's Windows or Mac. The people who DO know and want to put linux on their PC still have to PAY for the computer with Windows if they want most of the pre-built computers. So Windows still gets the sale. It has nothing to do with what is best for people. Large companies hire for ASP because they have no idea what they're talking about. Have you ever been interviewed by a high-up who didn't understand the technology? They have a list of requirements they get from god knows where, probably just skimmed from OTHER job ads, and they use technology they were SOLD by a REP. No one is trying to sell Linux to them, but people try to sell them crap. So they use the crap because they don't know about the free stuff or they're told by the crap sales people that the free stuff is really crap or why would it be free?
  8. Yeah it's like one click and drag in photoshop
  9. Not really. He has double quotes inside the string. It's how to make a string inside a string basically, for SQL. I would do it this way: $sqlUpdate = "UPDATE Customers SET userPassword = '$pwd_to_insert' WHERE userName = '$username' AND userMail = '".$_POST['user_Mail']."'"; It's the same thing.
  10. Hmm. What happens when you add print_r($_POST); to the top of the page?
  11. It's called a gradient. I'll make one for you for $10 Heck I'll even write the CSS for you for another $10.
  12. <?php $query = "SELECT mem_dname, mem_id FROM members WHERE mem_online=1 ORDER BY mem_dname DESC LIMIT 10"; $result = mysql_query($query) or die(mysql_error()); if (!mysql_num_rows($result)>0){ echo("Nobody is Online. =("); } $users = ""; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)){ $users .= '<a href="profile.php?id='.$row['mem_id'].'" class="a">'.$row['mem_dname'].'</a>, &nbsp'; } $users = substr($users, 0, (strlen($users)-2)); print $users; ?> Or: <?php $query = "SELECT mem_dname, mem_id FROM members WHERE mem_online=1 ORDER BY mem_dname DESC LIMIT 10"; $result = mysql_query($query) or die(mysql_error()); if (!mysql_num_rows($result)>0){ echo("Nobody is Online. =("); } $users = array(); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)){ $users[] = '<a href="profile.php?id='.$row['mem_id'].'" class="a">'.$row['mem_dname'].'</a>'; } $users = implode($users, ', '); print $users; ?> PS: You don't need to put a class on a link to style it if all of your links are styled the same. Just use a{ //css here } instead of: .a{ //css here } PPS: My power went out right before I hit Post. Sorry for the late reply. Crazy storms!
  13. I don't see a problem. Why do you say you have to do it twice? Try adding a print right after this line: $Result1 = mysql_query($updateSQL, $timedb) or die(mysql_error()); print 'Query Ran: '.$updateSQL.' Result: '.$Result1; What does it do? Also, can I look at the live version if you don't mind? IE, a link?
  14. Well if you want all of the page except certain content to print, use an if else, not a die!
  15. In the future, it's a good idea to at least leave the original post so it does not look confusing to other people. Also, other people might have had the same problem and now cannot benefit from your solution
  16. Well, you have a string which has one too many characters on the end. (use the second two) Or you have an array you want separated by another string. (use the first). Just try it.
  17. Do you know what die() actually does? Use print instead if you don't want the page to die().
  18. Here are some functions: http://php.net/implode or: http://php.net/strlen http://php.net/substr
  19. Oh for pete's sake. It looks like $yr is too low. IE, 0. Did you ever try printing it out right before that line to make sure it was set?
  20. Toon did you read it? SJames, what I would do is check if there is a space on both sides. Then, check if the words at the beginning of the sentence or the end are those words. Those are the only cases where it won't have a space on both sides. You had the right idea you just need to add that bit of logic. If you need help with that part still post the code that worked except for "An Owl" and we'll work on it together!
  21. First of all - Post your code. Secondly, this error usually means there was a problem with your SQL. Do your code like this: <?php $sql = "SQL HERE"; $result = mysql_query($sql) or die(mysql_error().' SQL: '.$sql); ?>
×
×
  • 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.