Jump to content

markharris1990

New Members
  • Posts

    5
  • Joined

  • Last visited

markharris1990's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks its on a remote server, the hosting site have their own php and mysql servers so im running from those
  2. thats great thanks ive changed that so now my line of code says mysqli_connect({hostname},{username},{password},{databasename}); and its running the script but im getting a redirection to a yahoo search saying site cant be found is there any reason for this. sorry about the questions im new to all this and its a bit annoying that im so close to cracking it but theres something always stopping it working
  3. Hi im new to all this coding with php and mysql, im trying to link some textboxes on a sign up page of a html to a table i have in mysql i was wondering if anyone would be able to check this code for me to see if im going wrong somewhere because im getting a failed to connect to mysql error but im not sure if its my code thats wrong or one of my account details that is wrong thank you <?php $con=mysqli_connect("mysqlusername","password","database name","table name"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } // escape variables for security $title = mysqli_real_escape_string($con, $_POST['title']); $firstname = mysqli_real_escape_string($con, $_POST['firtname']); $surname = mysqli_real_escape_string($con, $_POST['surname']); $email = mysqli_real_escape_string($con, $_POST['email']); $password = mysqli_real_escape_string($con, $_POST['pasword']); $DOB = mysqli_real_escape_string($con, $_POST['dob']); $Add1 = mysqli_real_escape_string($con, $_POST['add1']); $add2 = mysqli_real_escape_string($con, $_POST['add2']); $city = mysqli_real_escape_string($con, $_POST['city']); $post = mysqli_real_escape_string($con, $_POST['post']); $sql="INSERT INTO members (FirstName, surname, email, password, dob, Add1, Add2, postcode, city) VALUES ('$title', '$firtname', '$surname', '$email', '$password', '$dob', '$add1', '$add2', '$city', '$post')"; if (!mysqli_query($con,$sql)) { die('Error: ' . mysqli_error($con)); } echo "1 record added"; mysqli_close($con); ?> so what the code is doing is telling it to log into to mysql account and transfer the content of each of the textboxes into the matching cell in the table
  4. thanks ill have a read of it i get some of the stuff but i just couldnt find anywhere that explained it good enough to work out when i originally signed up to the voluntary placement the description was on the understanding that they would learn me web design because i already had a knowledge of html anyway but after i started a contract with them i was only doing database management instead then out of nowhere they gave me some plans and said create this for us and the site im creating is from their plans, so really i signed up thinking they was going to teach me but its not they just want me to already know what im doing and do it for them but the problem is im the only person in the entire office that has any knowledge at all so it all falls back to me but my contract ends in 3 days time.
  5. Hey i was wondering if anyone can help me please any help appreciated i am doing some work for a charity and i only have 3 days left now but they want a website creating that will allow people to sign up and have their own account they can log into and see their progress the thing i have no knowledge at all of php and mysql i have basic html though. i so far have created the html site which is all working and i have a mysql table to store details in but the part im stuck on is creating a script that will transfer details input into the signup text boxes into the database and then create the users account that only they can see. so i was wondering if anyone at all would be able to help me put together the script that will allow this the details so far are : phpmyadmin table database name: mymusicalworldt table name:members columns: id, title, firstname,surname, email, password, dob, addressline1, addressline2, postcode, city html input textboxes: title, irstname,surname, email, password, dob, addressline1, addressline2, postcode, city then also on the html theres a submit button called Register from what ive read i know i need to have some sort of link to the database and then i need to have a script that creates a set of files for that user thank you for any help
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.