Jump to content

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);

?>

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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