37 users online (0 members and 37 guests)  


  Results 1 to 4 of 4

Related

  1. Replies: 1
  2. connecting database to struts    Forum: Databases
    Replies: 0
  3. Connecting to database    Forum: CGI Perl Forum
    Replies: 0
  4. Error connecting to mysql    Forum: PHP Forum
    Replies: 1
  5. Replies: 0
  1. #1
    dnovs's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2004
    Posts
    1

    Connecting to Mysql Database

    Hi there,

    I'm trying to connect a PHP form to a Mysql database and all is fine until I add a "redirect" page upon form submission.

    I'm using dreamweaver's "Insert Record" server behaviour. When I fill in the "After inserting, go to:" field the whole form breaks! Any ideas why? Can php perform two actions? 1) Insert record into database and 2) display page upon submission?

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Maybe if you define breaks, and post your code, we might be able to help you. The above is not a lot to go on.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    hzane's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2003
    Posts
    11

    Can php perform two actions?

    The simple trick that i use is just add

    header("index.php");

    to the end of your php function.
    If the function gets that far (and you are using logic checks) then the action will be a success.....Upon success the browser will be redirected to whatever page you want.

    Is that along the lines of what you were asking?

  4. #4
    vr4indian's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2006
    Posts
    2

    Re: Connecting to Mysql Database

    user header('location:index.php');



Tags for this Thread