Please see this code, this code is sending every data that has been entered in the field and then fetching it and showing it on the screen.
i, onu almak her veri için yeni bir sayfa oluşturmak istiyorum
örneğin,
suppose a code fetch a text 'ABC' from mysql , i want my code to create a new page for this page called 'ABC.html' and show the link on the screen, this should be done with every fetched data.
Örnek -> http://FBlykes.com
İşte benim kod,
<?php
$name=$_POST['name'];
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("quotes") or die(mysql_error());
?>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="text" name="name">
<input type="submit" value="GO" name="submit">
</form>
<?php
if(isset($_POST['submit']))
{
mysql_query ("INSERT INTO example (name) VALUES('$name')") or die(mysql_error());
}
//Fetching
$query = "SELECT * FROM example ORDER BY id DESC";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result))
{
echo "<li>";
echo $row['name'];
echo "</li>";
}
?>