Jump to content

steelerman99

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Everything posted by steelerman99

  1. could you explain what exactly is going on in your while loop (sorry, i'm not too too advanced with php syntax)? specifically the '?' , ':', and '.' put in odd places- what does that do? are you dynamically building the select statement from a query? i don't want to put the whole query row into a drop down. just one column in the database (let's call it the fruit column), has about 8 choices only (but we'll use 3 in this example). the other columns have nothing to do with fruit. that value is put into a variable say $myfruit, which is a string (lets say $myfruit = "orange" on this particular query of the DB). i just want whatever $myfruit is to be automatically selected in a drop down menu that consists only of "apple", "orange", and "banana" Thanks again guys!!
  2. Hello! I have a database with a couple of fields that only have a certain number of options. I have a page where a user selects 1 record and updates it. When i query the database and retrieve the data in that particular field, i want that value to be automatically selected in a drop down menu(since there are a finite number of options and this will prevent the user from putting in bad input which would screw up searching). So if i have a select statement: <select name = "fruit"> <option value = "apple">Apple</option> <option value = "banana">Banana</option> <option value = "orange">Orange</option> </select> and the value pulled out of the database on the query is either "orange" or "banana", how do i get that selected as the default value in my drop down menu when the page loads? Thanks for the help! If you need clarification on what i'm trying to do, just let me know.
  3. Hello, I've just recently learned php and have coded a website with a bunch of php and a mysql database (although i haven't put it online- just have been coding it on my hard drive and testing it with WAMP). Now, when the time comes and i go to put my site on the net using a commercial host (bluehost or godaddy or something similar), what measures should i take to make sure my site doesn't get hacked? I have a bunch of important data that i can't have tampered with (an online schedule with web interface updates). Is all the security i need provided by the commercial hosts, or do i have to take some steps myself? Can anyone point me to a tutorial or something to help get me started? I read something on php.net, but i'm looking for more of a "hold your hand and walk you through it" kind of tutorial. haha But any help is appreciated. Thanks!!
  4. Thanks! One more question: On the logout screen, i now get this warning message: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\wamp\www\logout.php: in C:\wamp\www\logout.php on line 9 What is causing this?
  5. Hello, I'm somewhat new to php. I have a login script that i wrote. When i try to log someone out, i'm not totally sure what to do to clear ALL session variables. I thought session_destroy() would do the trick, but that's not the case. What should i do to get rid of all of the session variables i have? Thanks!!!
×
×
  • 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.