-
udpate php form
How to do that sorry i am still learning PHP but ive been stuck with this thing for the past few days
-
udpate php form
Thank you everyone but its still not working. Getting same error PS ive made all of them to POST This is the process.php <?php error_reporting(E_ALL); ini_set('display_errors', '1'); $linid = $_POST['linid']; $sql = "SELECT * FROM edit WHERE id = $linid"; $result=mysql_query($sql); $con=mysqli_connect("localhost","root","root","lil"); if(mysqli_connect_error()){ echo "failed to connect" . mysqli_connect_error(); } $name = mysqli_real_escape_string($con, $_POST['name']); $email = mysqli_real_escape_string($con, $_POST['email']); $institution = mysqli_real_escape_string($con, $_POST['institution']); if($result = mysqli_query($con,"UPDATE edit SET email = $email WHERE id = $linid")) { echo "its deletd"; } else { echo "Failed to update."; } mysqli_close($con); ?> This is update.php <?php include "head.php"; ?> <section> <h3>Update user details</h3> <form action="update-process.php" method="POST"> Name: <input type="text" name="name"/> </br> </br> </br> Email: <input type="text" name="email"/> </br> </br> </br> Instit: <input type="text" name="institution"/> </br> </br> </br> <input type="submit"/> </form> </section> <?php include "aside.php"; ?> <?php include "footer.php"; ?>
-
-
udpate php form
Hi everyone, Thank you for your reply Here is what i am trying to do. This is the admin area and i can easily delete a record However when i try to update it doesnt work so i click on the update button for any of them and it gets the right id and etc This is the update page When i press query i get this error This is my update.php code the form <?php include "head.php"; ?> <section> <h3>Update user details</h3> <form action="update-process.php" method="POST"> Name: <input type="text" name="name"/> </br> </br> </br> Email: <input type="text" name="email"/> </br> </br> </br> Instit: <input type="text" name="institution"/> </br> </br> </br> <input type="submit"/> </form> </section> <?php include "aside.php"; ?> <?php include "footer.php"; ?> This is the update process.php <?php error_reporting(E_ALL); ini_set('display_errors', '1'); $linid = $_GET['linid']; $sql = "SELECT * FROM edit WHERE id = $linid"; $result=mysql_query($sql); $con=mysqli_connect("localhost","root","root","lil"); if(mysqli_connect_error()){ echo "failed to connect" . mysqli_connect_error(); } $name = mysqli_real_escape_string($con, $_POST['name']); $email = mysqli_real_escape_string($con, $_POST['email']); $institution = mysqli_real_escape_string($con, $_POST['institution']); if($result = mysqli_query($con,"UPDATE FROM edit WHERE id = $linid")) { echo "its deletd"; } else { echo "Failed to update."; } mysqli_close($con); ?> PS i am using mysqli
-
udpate php form
Hi, i need help i have been trying to make a mysqli update form. I figured out delete and adding a new table but i dont know how to update an existing table. Can someone please help me ?
- Tips on improving website design
-
Tips on improving website design
Hello everyone, i have been working on an online news paper and was wondering if you all can give me tips on how i can improve its design http://theworldtimes.co.uk/RSC/index.php
-
need help with register form
Oh it turns out my problem was the php version and different syntax used
-
need help with register form
Its still not working in that i mean its not putting in the data into the database
- need help with register form
-
need help with register form
the first part checks to see wether the username exists all ready and the seond part if the username doesnt exist will input the info into the data. For some reason its not inputting the information into the dtabase.
-
need help with register form
Hi everyone i have created a register form that registers a new user to a website that im working on, but for some reason the sql query doenst work. include "connect.php"; $user = $_POST['user']; $passs = $_POST['pass']; //$ip = $_SERVER['REMOTE_ADDR']; $result = mysql_num_rows(mysql_query("SELECT * FROM login WHERE user = '$user'")); // checks the table for a similar username if($result == 1) //if it does exist it will echo below { echo "The username you have chosen already exists!"; } else // else it will insert into loggy usern, password, email and etc. { mysql_query("INSERT INTO login (user, pass) VALUES ('$user', '$pass')"); echo "<p>Congratulations! You have successfully registered! </p> <p>Click <a href = \"login.php\">here</a> to login.</p>"; } Can you please help
-
Object oriented javascript help
How can i do that and what is the problem in this code
-
Object oriented javascript help
Hi everyone Havent posted in a long time. First thank you all for the fantastic support you have given me ever sine i came here. Ok i need a little help. The OO is suppose to show a number for the article, a header title and a story but havent been able to get it to work I have been working on an OO that looks like this: Please help function myArticle(storyId, header, story) { this.storyId = storyId; this.header = header; this.story = story; var newNum = document.createElement("i"); var add_storyId = document.createTextNode(this.storyId); var newHeader = document.createElement("h2"); var add_header = document.createTextNode(this.header); var newPara = document.createElement("p"); var add_story = document.createTextNode(this.story); var getFooter = document.getElementById("footer"); document.body.insertBefore(Num,Story ,newPara, getFooter); } function init() { myNews = new storyId("1"); myNews = new header("The latest ne."); myNews = new story("The lwqdqqwd ewecew3 3332edew"); myNews.show(); }
- Cookies question
-
Need help: Object oriented comments
Hi everyone, i need help with making an object oriented javascript comment form, that can add and remove elements. I also need something else that you can do with OO in javascript?