msql data transer problems

Reply

Join Date: Jan 2005
Posts: 1
Reputation: flameifrit is an unknown quantity at this point 
Solved Threads: 0
flameifrit flameifrit is offline Offline
Newbie Poster

msql data transer problems

 
0
  #1
Jan 26th, 2005
I am tring to complete a project for university using msql, php, apache and phpmyadmin(local)

The main basis for this project is being able to transfer data to and from a mysql database.
Having never used the languages required I am having trouble figuring out what I am doing wrong. All I want to do for now is put a record in a table using forms on a php page.

I have managed to put this together (see below) but all I get is "page cannot be displayed"

I have looked through the previous posts but I could not find one that helped
If any of you programming geniuses can help me out I’d really appreciate it

Thanks....flameifrit

I am using......

>php 4.3.9
>phpmyadmin 2.6.1
>msql servers and clients 3.23.49
>apache http server 2.0.50


**********************************************

<html>
<body>
<?php

if ($submit) {

// process form

$db = mysql_connect("localhost", "root");

mysql_select_db("TECH_HELL_FORUM",$db);

$sql = "INSERT INTO topic (ID,TopicName) VALUES ('$ID','$TopicName')";

$result = mysql_query($sql);

echo "Thank you! Information entered.\n";

} else{

// display form

?>

<form method="post" action="<?php echo $PHP_SELF?>">

ID:<input type="Text" name="ID"><br>

TopicName:<input type="Text" name="TopicName"><br>

<input type="Submit" name="submit" value="Enter information">

</form>
<?php

} // end if

?>
</body>
</html>

****************************************************
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC