User Profile

Collapse

Profile Sidebar

Collapse
robbiesmith79
robbiesmith79
Last Activity: Oct 3 '07, 04:45 AM
Joined: Oct 3 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • And I noticed a part of your code that could be optimized.

    1st.

    $min_price = $_POST["min_price"];
    $max_price = $_POST["max_price"];
    etc.

    = !YUCK!

    extract($_POST) ; // easy simple way of taking everything from the $_POST array and automatically generates all the variables with their respective $_POST names. The downside is that it takes all the variables...
    See more | Go to post

    Leave a comment:


  • robbiesmith79
    replied to e-commerce
    in PHP
    No ajaxrand. They're asking for a quick and easy way to store a username and password.

    Bascially you need to ask for a username and password at checkout.

    In your customers table, add those two fields

    Create a quick <form> that asks for those two fields, then
    Code:
    $userid = mysql_query("SELECT userid FROM customers where username='$username' and password = '$password'");
    ...
    See more | Go to post
    Last edited by ronverdonk; Oct 3 '07, 11:50 AM. Reason: adding code tags

    Leave a comment:


  • Ok.

    Rule #1 when submitting forms with textarea's. Use <form method="POST">

    method="GET" does not retain carriage returns i.e. 40 lines in textarea's.
    See more | Go to post

    Leave a comment:


  • robbiesmith79
    started a topic Header Redirect with Anchor Workaround
    in PHP

    Header Redirect with Anchor Workaround

    Here's a workaround that worked for me on a PC, Safari 3, FF 2, IE 7:

    Basically, you need an intermediary redirect page with a urlencode'd
    path. For example:

    AnyPage.php:

    $path = urlencode($_SER VER['PHP_SELF'] . "?arg1=a&arg2=b #anchor");
    header("locatio n:redirect.php? returnpath=$pat h");

    redirect.php:

    header("locatio n:" . $_...
    See more | Go to post
No activity results to display
Show More
Working...