Jump to content

rpadilla

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Posts posted by rpadilla

  1. try inserting a marker in your insert statment, to make sure its really executed like

     

    mysql_query($query) or die('Could not query: ' . mysql_error());

    echo 'my query was executed';

     

    also try making some error codes, maybe error reporting is off.

  2. you can parse the .sql file , you can use fopen  to read it and use the semicolon as your marker on which the sql ends

    make sure to leave the remarks too and the spaces.

     

    check out string functions in php, to help you determin where is the start and end of the query statement.

     

    good luck.

  3. checkout my first post, it should do that,

    if you have just two or three variables just use

    the $_SESSION

     

    page1.php

    session_start()
    $_SESSION['value1'] = $_POST['value1'];
    $_SESSION['value2'] = $_POST['value2'];

     

    page2.php

    session_start();
    echo $_SESSION['value1'];
    echo $_SESSION['value2'];
    

  4. 1. You can try putting the data in the url like this

     

    redirect.php?value=1&value2=2

     

    but this one is a bit insecure,

     

    2. you can put it in a session, since it will be saved,

      when you go to the next page.

     

    session_start()
    $_SESSION['value'] = 33;
    

     

    3. or you can store it in the db, its a bit complicated though.

  5. thats looks like a Class to me, you should include some files, or maybe a library? not sure though.

     

    For cache problems,

     

      one way to overcome it is to add a random value in your URL, since some ISP servers do some

    caching.

     

    so basically you can add something like this

     

    www.domain.com?page.php?x=8734745 

     

    where 8734745  is a random value

     

     

    or better you can try using php's function output_add_rewrite_var

     

    http://php.net/output_add_rewrite_var

     

     

     

     

     

  6. here you go

     

    file test.php

    <?php
    $action = $_POST['action'];
    
    if (isset($action) )
    {
       $name = $_POST['name'];
      if ($name=="Friday")
      echo "Have a nice weekend!"; 
    elseif ($name=="Saturday")
      echo "Tomorrow is Sunday!"; 
    else
      echo "Please enter Friday or Saturday"; 
    }
    
    ?>
    
    <form method="post" >
    Name: <input type="text" size="10" maxlength="40" name="name"> 
    
    <input type="submit" value="Send"> 
    <input type="hidden" name="action" value="submitted">
    </form>
    
    

  7. while($catqry = mysql_fetch_array(mysql_query("SELECT * FROM CATEGORIE ORDER BY VolgNr")))

     

    you get a new resource everytime... thats why it loops forever.

    you should do like this

     

    $sql   = " SELECT * from ...";
    $res   = mysql_query($sql) or die(mysql_error());
    while($rows = mysql_fetch_array($res))
    {
      ....
    ...
    

  8. hi,

     

      the trick here is to redirect back again, so that when the user refreshes the page it won't re submit the data

     

     

      so in the end of the submission process of the data do something like this

     

     

      header("location: whereyouwanthimback.php");

     

     

    in this way refreshing, won't make a resubmit of data.

     

    cheers

  9. Hi,

     

      use cookie, like what other web apps do, when you check  the box,  remember me, this will save some

    cookie values on the client computer, so when you open your the site again you don't need to re login.

     

    basically the md5 hash of the password and username is saved in the cookie, and when the user goes to

    the site again, it will read the cookie, and used the values to log you in.

     

    Good luck.

×
×
  • 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.