include ('forum.php');
is that supposed to be form.php?
ANyway, $username and $country don't exist in insert.php
It looks as though you've messeed up which bit of code goes in which file. Have another think about where the data goes.
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
No.
I've said you need to refactor gour code
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
<?php
mysql_connect("localhost", "root", "test") or die(mysql_error());
echo "Connected to MySQL";
mysql_select_db("testdb") or die(mysql_error());
?>
<?php
@$username = $_POST['name'];
@$country = $_POST['country'];
?>
Put this in form.php, removeinclude(form.php) and try. If you want to show the form again. Redirect to that page when the INSERT finished with custom message, FAILS or SUCCESSES. There is a lot of tutorials on the internet. You can google for that.
Zero13
Practically a Master Poster
624 posts since Jan 2009
Reputation Points: 120
Solved Threads: 139
It suggests that there may be unbalanced braces {} somewhere
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
Great, thanks for sharing. Please mark the thread solved (there is a link below).
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080