Jump to content

[SOLVED] Weird text above INSERT success message?


rawky1976

Recommended Posts

I've passed form data to a new INSERT page that inserts the data and informs success but just above the success message is diplayed: -

 



 

...in IE and Firefox?

 

Does anyone know what this means?

 

I used the same code on a page without passing and that didn't display it?

 

 

Here's some code man!

 

...

<h3 class="headerstyle">Users: -</h3>

<div id="currentengineer">

 

<?php

if(isset($_POST['adduser']))

{

include 'config.php';

include 'opendb.php';

 

$firstname = $_POST['firstname'];

$lastname = $_POST['lastname'];

$ext = $_POST['ext'];

$bleep = $_POST['bleep'];

$exttel = $_POST['exttel'];

$email = $_POST['email'];

 

$query = "INSERT INTO users (user_fname, user_sname, user_ext, user_bleep, user_extno, user_email) VALUES ('$firstname', '$lastname', '$ext', '$bleep', '$exttel', '$email')";

 

mysql_query($query) or die('Error, insert query failed with error:');

 

include 'closedb.php';

}

?>

 

 

<p />You have successfully entered the new user into the Service Management

database, continue working using the links on the right</div>

 

...

closedb.php:

 

<?php

 

mysql_close($conn);

 

?>

 

 

config.php:

 

<?php

$dbhost = 'localhost';

$dbuser = 'root';

$dbpass = 'password goes here';

$dbname = 'db name goes here';

?>

 

 

opendb.php:

 

<?php

 

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');

mysql_select_db($dbname);

?>

 

Archived

This topic is now archived and is closed to further replies.

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