Im trying to do something like a config editor or content editor..
Atm i just found
WORKING:
I want it also that it could read the values from the database as a input then i could edit it and change.
Could any one create a simply example?
Atm i just found
WORKING:
PHP:
<h2>Input Only</h2>
<form method="post">
id:<br>
<input type="text" name = "id" size="30"> <br>
value:<br>
<input type="text" name = "value" size="30"> <br>
name:<br>
<input type="text" name = "name" size="30"> <br>
<input type="submit" value="dodaj dane"> <br>
</form>
</body>
</html>
<?php
$baza = "mod";
$tabela = "k_injection";
$connection = mysql_connect ("localhost","root","");
$wybierz = mysql_select_db ($baza,$connection);
@$id=mysql_real_escape_string($_POST['id']);
@$value=mysql_real_escape_string($_POST['value']);
@$name=mysql_real_escape_string($_POST['name']);
$wstaw = "INSERT INTO $tabela (id, value, name) VALUES ('$id','$value','$name')";
$rezultat = mysql_query($wstaw,$connection);
if ($rezultat) {
echo "Do tabeli dodano dane:
<b>ID:</b> <i>$id</i><br>
<b>NAME:</b> <i>$name</i><br>
<b>VALUE:</b> <i>$value</i><br>";
}
else {
echo "Error";
}
?>
I want it also that it could read the values from the database as a input then i could edit it and change.
Could any one create a simply example?
Last edited: