#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    23
    Rep Power
    0
    hi, thanks to all,
    help me please.


    what is wrong in my redirection of url.
    if record is inserted then i want to send another page. esle also same thing.


    <?php
    mysql_connect('localhost', 'saf', 'afdsdfs');
    mysql_select_db("chennaichalo");
    $result=mysql_query("insert into movieinfo(idno,id,cinema,name) values($id,NULL,'$cinema','$name')");
    ?>

    <?php
    if(mysql_affected_rows($result)!=0)
    {
    header("Location:movieinfo.php3");
    exit;
    }esleif(mysql_affected_rows($result)==0)
    {
    header("location:movieinfo.php3");
    exit;
    }
    ?>
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    <?php
    mysql_connect('localhost', 'saf', 'afdsdfs');
    mysql_select_db("chennaichalo");
    $result=mysql_query("insert into movieinfo(idno,id,cinema,name) values($id,NULL,'$cinema','$name')");
    ?>

    <?php
    if(mysql_affected_rows($result)!=0)
    {
    header("Location:movieinfo.php3");
    exit;
    }esleif(mysql_affected_rows($result)==0)
    {
    header("location:movieinfo.php3");
    exit;
    }
    ?>
    >>


    Sundar,

    White space should not be their before your header function.

    <<
    esleif(mysql_affected_rows($result)==0)
    >>

    Also this line is wrong.

    try the following..

    <?php
    $con=mysql_connect('localhost', 'saf', 'afdsdfs');
    mysql_select_db("chennaichalo",$con);
    $result=mysql_query("insert into movieinfo(idno,id,cinema,name) values($id,NULL,'$cinema','$name')",$con);
    if(mysql_affected_rows($result)>0)
    {
    header("Location: movieinfo.php3");
    exit;
    }else{
    header("Location: movieinfo.php3");
    exit;
    }
    ?>


    Good Luck!!

    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."

    [This message has been edited by Shiju Rajan (edited August 11, 2000).]
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    112
    Rep Power
    15
    i think shiju is right but if you still have problems try using the full http://xyz.com/moveinfo.php3 address to test if it works or even try sending it to some other website

    waseem

    into sport?? goto
    http://www.sportwebapges.com

    ------------------
    visit the next big thing in Information Technology http://www.itstop.com
    pre-register now
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    23
    Rep Power
    0
    Shiju Rajan sir,


    <?php
    mysql_connect('sgdfgsgs', 'dgdsd', 'dgdgd');
    mysql_select_db("chennaichalo");
    $result=mysql_query("insert into movieinfo(idno,id,cinema,name) values($id,NULL,'$cinema','$name')");
    if(mysql_affected_rows($result)>0)
    {
    header("Location: <A HREF="http://www.chennaichalo.com/movieinfo.php3");" TARGET=_blank>www.chennaichalo.com/movieinfo.php3");</A>
    exit;
    }else{
    header("Location: <A HREF="http://www.chennaichalo.com/movieinfo.php3");" TARGET=_blank>www.chennaichalo.com/movieinfo.php3");</A>
    exit;
    }
    ?>


    its not working . is there any prob.....
    please try to solve it.


    [This message has been edited by sundar (edited August 11, 2000).]
  8. #5
  9. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    <<
    <?php
    mysql_connect('anvil', 'chennaic', 'card34bit');
    mysql_select_db("chennaichalo");
    $result=mysql_query("insert into movieinfo(idno,id,cinema,name) values($id,NULL,'$cinema','$name')");
    if(mysql_affected_rows($result)>0)
    {
    header("Location: <A HREF="http://www.chennaichalo.com/movieinfo.php3");" TARGET=_blank>www.chennaichalo.com/movieinfo.php3");</A>
    exit;
    }else{
    header("Location: <A HREF="http://www.chennaichalo.com/movieinfo.php3");" TARGET=_blank>www.chennaichalo.com/movieinfo.php3");</A>
    exit;
    }
    ?>
    >>


    Sundar,

    cut and paste the following script in a notpad.make sure that no space before your "<?"(ie,php deliminator).

    try this.
    <?php
    $con=mysql_connect('anvil', 'chennaic', 'card34bit');
    mysql_select_db("chennaichalo",$con);
    $result=mysql_query("insert into movieinfo(idno,id,cinema,name) values($id,NULL,'$cinema','$name')",$con);
    if(mysql_affected_rows($result)>0){
    header("Location: <A HREF="http://www.chennaichalo.com/movieinfo.php3");" TARGET=_blank>http://www.chennaichalo.com/movieinfo.php3");</A>
    }else{
    header("Location: <A HREF="http://www.chennaichalo.com/movieinfo.php3");" TARGET=_blank>http://www.chennaichalo.com/movieinfo.php3");</A>
    exit;
    }
    ?>

    ---------****----
    Where are you working in chennai?.
    --
    Don't post the code with your actual server details in your connection string!!!(That may not be safe everytime).
    --
    you know,i was their in chennai 3 years.

    write me at : shiju@post.com if you have some free time..

    Actually i'm looking for a php programmer very urgently.Please tell me if you can help me in some way..

    Good Luck!!!

    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."



    [This message has been edited by Shiju Rajan (edited August 11, 2000).]

Similar Threads

  1. simple form, simple trigger, whats wrong ??
    By zishto in forum Oracle Development
    Replies: 3
    Last Post: January 12th, 2004, 01:25 PM
  2. what is wrong with this code ????
    By fule in forum Database Management
    Replies: 1
    Last Post: November 20th, 2003, 01:24 AM
  3. *sigh*
    By vb.net in forum Dev Shed Lounge
    Replies: 45
    Last Post: November 9th, 2003, 07:52 PM
  4. offsetHeight returning the wrong height
    By Tobbe in forum HTML Programming
    Replies: 10
    Last Post: October 19th, 2003, 08:23 AM

IMN logo majestic logo threadwatch logo seochat tools logo