944,089 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 2366
  • MySQL RSS
Jan 26th, 2005
0

msql data transer problems

Expand Post »
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>

****************************************************
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
flameifrit is offline Offline
1 posts
since Jan 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: Saving Code in PHP
Next Thread in MySQL Forum Timeline: Refresh Form to Display changes





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC