Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
F

fly904

@fly904
About
Posts
550
Topics
34
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Maths magic! Amazing answer
    F fly904

    This[^] seems appropriate. What's the largest number you can think of?

    If at first you don't succeed, you're not Chuck Norris.

    The Lounge

  • The Masters
    F fly904

    The only thing worse than golf on the TV is golf on the radio.

    If at first you don't succeed, you're not Chuck Norris.

    The Lounge html com

  • Broken link
    F fly904

    The "Mobile" link at the bottom of the page redirects to a 403 - Forbidden: Access is denied page. http://www.codeproject.com/MasterPages/?display=Mobile[^]

    If at first you don't succeed, you're not Chuck Norris.

    Site Bugs / Suggestions com question

  • Redirect after execution
    F fly904

    In the PHP documentation[^] it actually quotes:

    php.net wrote:

    Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP.

    Two solutions:

    1. Have it (the header) at the top of the page before you output anything to the browser.
    2. Use Output Buffering[^] to hold the output before it is sent to the browser.

    If at first you don't succeed, you're not Chuck Norris.

    Linux, Apache, MySQL, PHP php com question

  • recursive array search
    F fly904

    Then there would appear to be something wrong with your logic.

    nhsal69 wrote:

    if (((isset($index) AND ($it->key() == $index)) OR (!isset($index))) AND ($it->current() == $needle))

    If at first you don't succeed, you're not Chuck Norris.

    Linux, Apache, MySQL, PHP database data-structures help

  • recursive array search
    F fly904

    nhsal69 wrote:

    return $aIt->key();

    echo $aIt->key();

    Is there any reason why you are returning and then outputing? The output code (echo) is unreachable.

    If at first you don't succeed, you're not Chuck Norris.

    Linux, Apache, MySQL, PHP database data-structures help

  • To UKCPians: A Public Safety Warning
    F fly904

    Ah yes, Calne, not been there before. However, this is getting weird now, I plan to take the GF to see the White Horse at Cherhill on Thursday, if the weather is nice. She likes White Horses, something about Deftones.

    If at first you don't succeed, you're not Chuck Norris.

    The Lounge

  • To UKCPians: A Public Safety Warning
    F fly904

    Reading = West Country?

    If at first you don't succeed, you're not Chuck Norris.

    The Lounge

  • To UKCPians: A Public Safety Warning
    F fly904

    Castle Combe? It would be very weird if it is.

    If at first you don't succeed, you're not Chuck Norris.

    The Lounge

  • To UKCPians: A Public Safety Warning
    F fly904

    Where abouts in the west country?

    If at first you don't succeed, you're not Chuck Norris.

    The Lounge

  • Project Management CMS
    F fly904

    I'm not familiar with many CMS systems, but this[^] site provides good comparisons of many CMS systems. Not sure if that will help or not.

    If at first you don't succeed, you're not Chuck Norris.

    Linux, Apache, MySQL, PHP php business collaboration beta-testing question

  • Small Town Credit Card Transactions (The Cake is a Lie!)
    F fly904

    If I waste my day playing Portal tomorrow, I'm blaming you.

    If at first you don't succeed, you're not Chuck Norris.

    The Lounge com sales workspace

  • Gold for Britain!
    F fly904

    Britain + Tea Tray = A No-Brainer, no matter how we use it!

    If at first you don't succeed, you're not Chuck Norris.

    The Lounge announcement

  • How to redirect ?
    F fly904

    You are more than likely outputing stuff to the browser before you set the header (redirect), which isn't allowed (read the docmentation[^]). You should also call exit; after you set a redirection header (also described in the documentation), to make sure the script is stopped.

    If at first you don't succeed, you're not Chuck Norris.

    Linux, Apache, MySQL, PHP com tutorial question career

  • how to change PHP code
    F fly904

    wartotojas wrote:

    how to output query results the same way as they are in while loop?

    Many of the most basic tutorials demonstrate this. This Tizag Tutorial[^] is a good example.

    If at first you don't succeed, you're not Chuck Norris.

    Linux, Apache, MySQL, PHP database help tutorial php data-structures

  • So, I just lost my job.
    F fly904

    Andi Osho is going to be at my student unions Comedy Night later this month. Should be good.

    If at first you don't succeed, you're not Chuck Norris.

    The Lounge csharp php wpf com tools

  • Timestamps... Can't Seem to get it to work.....
    F fly904

    You are still not sanitizing your data inputs, to protect you from SQL Injection Attacks[^]. Use: mysql_real_escape_string[^]

    thebiostyle wrote:

    "".$get_user_data['username'].""

    That does nothing useful. You don't need the empty strings either side, they do nothing, just have the variable.

    thebiostyle wrote:

    $start_passsess = $_SESSION['password'] = "".$get_user_data['password']."";

    Are you sure you want to keep the hashed password as a session variable?

    If at first you don't succeed, you're not Chuck Norris.

    Linux, Apache, MySQL, PHP database help mysql announcement

  • PHP Member Pages... Need major help...
    F fly904

    thebiostyle wrote:

    Yes, I know that, but in an earlier post, it said that I was right to use the "GET" method.

    thebiostyle wrote:

    Okay... Thanks, it now shows the page and loads the information... But how do I fix the... "profile.php?username=USERNAMEOFCHOSENUSER&user=IDOFCHOSENUSER" to "profile.php?user=IDOFCHOSENUSER"

    ALL the inputs in your form are sent to the URL, if you don't want them in the URL then don't have them in the form!

    If at first you don't succeed, you're not Chuck Norris.

    Linux, Apache, MySQL, PHP tutorial php database mysql com

  • PHP Member Pages... Need major help...
    F fly904

    Before you continue, I suggest you tidy up your code and get into some good practices.

    thebiostyle wrote:

    include_once"CONFIGPAGE.php";

    Encapsulate the target file in brackets: include_once('CONFIGPAGE.php');. And use single quotes, as it is quicker.

    thebiostyle wrote:

    $fetch_users_data = mysql_fetch_object(mysql_query("SELECT * FROM `members` WHERE username='".$_REQUEST['username']."'"));
    $fetch_users_id = mysql_fetch_object(mysql_query("SELECT * FROM `members` WHERE id='".$_GET['user']."'"));

    You need to check first whether or not 'user' and 'username' are set. If they aren't then it will throw errors.

    $username = isset( $_REQUEST['username'] ) ? $_REQUEST['username'] : '';
    $user = isset( $_GET['user'] ) ? $_GET['user'] : '';

    You seriously need to sanitise your data inputs to protect from SQL injection attacks. Use the mysql_real_escape_string[^] function.

    $username = mysql_real_escape_string( $username );
    $user = mysql_real_escape_string( $user );

    Then use those sanitized values as your SQL inputs.

    thebiostyle wrote:

    echo "".$fetch_users_data->username."";

    There is no need for the "" around the value. It will work just fine without it: echo $fetch_users_data->username;

    thebiostyle wrote:

    There is no need to have an onload attribute, with $_GET['user']. It is also bad practice to use bgcolor. Use the style attribute instead, or better still use CSS classes.

    thebiostyle wrote:

    </div>
    </table>

    From what I can see you haven't opened a div; therefore there is no need to close one. Note that you should also have a DOCTYPE which you should work from. http://www.w3schools.com/tags/tag_DOCTYPE.asp[^]

    If at first you don't succeed, you're not Chuck Norris.

    Linux, Apache, MySQL, PHP tutorial php database mysql com

  • PHP Member Pages... Need major help...
    F fly904

    thebiostyle wrote:

    <form action='profile.php' method='GET'>

    Do you know what the GET method of submitting a form actually does? Every input within the form, has their value displayed in the URL on the action page (the page the form is submited to). E.g.

    <form action="submit.php" method="get">
    <input type="hidden" name="fieldName" value="fieldValue" />
    <input type="hidden" name="fieldName2" value="fieldValue2" />
    </form>

    Would direct to submit.php?fieldName=fieldValue&fieldName2=fieldValue2

    If at first you don't succeed, you're not Chuck Norris.

    Linux, Apache, MySQL, PHP tutorial php database mysql com
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups