General discussion

Locked

back to home page after execute a php

By wenjune_2000 ·
the url is httpp://www.29orientalexpress.com.
I am learning php to access my database.
after I execute my insert.php file, the page left my home page frames. how can I stay in the main frame area after the insert.php file.
<?
include("dbinfo.inc.php");
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$FirstName=$_POST['FirstName'];
$LastName=$_POST['LastName'];
$Email=$_POST['Email'];
$OrderPhone=$_POST['OrderPhone'];
$SecondPhone=$_POST['SecondPhone'];
$Address=$_POST['Address'];
$Note1=$_POST['Note1'];

$query = "INSERT INTO CustomerRecords VALUES ('','$FirstName','$LastName','$Email','$OrderPhone','$SecondPhone','$Address','$Note1')";

mysql_query($query);

mysql_close();

?>

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Jaqui In reply to back to home page after e ...

it's not the query script doing this.
it's the output script.
is the output being sent with target attribute to keep the frameset?

Collapse -

by amanabala In reply to back to home page after e ...

Hello,
I looked at your homepage and I think the issue is with the following HTML code:
<form action="insert.php" method="post" target="_parent" >
Since there is no frame called "_parent", the page is opening somewhere else. Your form is in a frame called "showframe" so, please modify the
above HTML code to:
<form action="insert.php" method="post" target="showframe" > and it will work.
Please try and let me know.
Regards,
Ravi

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums