Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

13513075 - Bimo Aryo Tyasono #77

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
- Bisa menampilkan daftar question dari database
- Bisa menambahkan pertanyaan setelah klik Ask Here
- Bisa mengedit pertanyaan
  • Loading branch information
squilliams committed Oct 10, 2015
commit da6f42f8ad4f740327c474bb41b88bece417cd99
8 changes: 7 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
@@ -31,8 +31,14 @@
$email = $_POST["email"];
$topic = $_POST["topic"];
$content = $_POST["content"];
$id = $_POST["id"];
if ($id == "NULL"){
$sql="INSERT INTO qlist (name, email, topic, content) VALUES ('$name', '$email', '$topic', '$content')";
}
else {
$sql="UPDATE qlist SET name='$name', email='$email', topic='$topic', content='$content' WHERE id='$id'";

$sql="INSERT INTO qlist (name, email, topic, content) VALUES ('$name', '$email', '$topic', '$content')";
}
$result=mysqli_query($link,$sql);
}