Jump to content

codex...

Members
  • Posts

    7
  • Joined

  • Last visited

Previous Fields

  • Languages
    (x)html, css, php, JavaScript, MySQL, API's, Java class libraries

Profile Information

  • Location
    England, UK
  • Interests
    Web Programming

Recent Profile Visitors

626 profile views

codex...'s Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Hi, This is my first time, to answer a Question on this forum, after being a member for a few years now, you guys are doing a great job, answering questions and solving technical issues, many thanks!! Now, moving on, to the answer to this post, may I suggest to you that, in the css code you have posted, please rewrite this line of code, (highlighted in red) from: input[type=text], select, textarea { width: 100%; padding: 12px; width: 48%; border: 6px double #96BADD; border-radius: 8px; font-family: "Tahoma", sans, serif; font-size: 20px; box-sizing: border-box; margin-top: 6px; margin-bottom: 16px; resize: vertical; } to this resize: horizontal; and save your contact form. I think that might solve the problem, hopefully. Thanks.
  2. Hi Guys, thanks once again for your efforts, mysql stuff is interesting - connection to my host server is now the problem, sometimes I get connected and sometimes I don't, there should be a solution to this I think... am not sure See the browser output I get below: Warning: Connect Error (2002) Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2) this is the 'code' I am using now to connect - $mysqli = new mysqli("servername", "username", "password", "dbname"); your suggestions are welcome... Thanx!
  3. Hi Guys, thanks for your help, I have tried this out, and this is the message I got, after I did the error checking... MySQL error: It did not really tell what the error is, I ran this code a few times and I got the same reply, any possible suggestions are welcome... Thanx!
  4. Hi Guys, I appreciate your help and replies, please help with MySQL problem, my connection to the database is now O.K which I did not get previously, the error I get now on clicking the submit button of a web-form is as follows: Fatal error: Call to a member function bind_param() on a non-object in /homepages/18/d440109193/htdocs/welcome.php on line 22 any suggestions or help is welcome, please feel free to ask me any questions, Thanks!
  5. Hi, Thanks for your pointers, the links you sent me, they were very helpful. I have been trying out stuff changing my database code, using prepared statements as you’ve advised, but I get this error message, when I run the code. After filling a web-form on clicking the submit button, I get this Fatal error: Call to a member function bind_param() on a non-object in /homepages/18/d440109193/htdocs/welcome.php on line 22 I tried to fix the problem, but I keep getting the same error message, any suggestions to fix this error. SEE BELOW THE CURRENT CODE. <?phpsession_start();spl_autoload_extensions(".php");$servername = "localhost";$username = "username";$password = "password";$dbname = "myDB";// CREATE CONNECTION - LINK_IDENTIFIER, MYSQL CONNECTION$conn = new mysqli("xxxxxxxx", "xxxxxxxx", "xxxxxxxx", "xxxxxxxx"); // CHECK CONNECTIONif ($mysqli->connect_error) { die('Connect Error (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);}//PREPARE AND BIND$stmt = $conn->prepare("INSERT INTO Users (username, firstname, lastname, email, password, confirmpassword) VALUES(?, ?, ?, ?, ?, ?)");$stmt->bind_param("ssssss", $username, $firstname, $lastname, $email, $password, $confirmpassword);//SET PARAMETERS AND EXECUTE$username = "";$firstname = "";$lastname = "";$email = "";$password = "";$confirmpassword = "";$stmt->execute();echo "New records created successfully";$stmt->close();$conn->close();?> any suggestions to fix this, Thanks!
  6. Hi,Thanks for your prompt reply, I have been a bit busy doing other stuff, sorry for my late reply.“A reminder of my main problem – On clicking the submit button, after a web-form has been filled looks O.K, but on checking the MySQL database, there is no data saved inside the database.”THIS IS THE HTML CODE I HAVE USED.<?php{ echo "<form name='registerform' method='post' action='insert.php' enctype='application/x-www-form-urlencoded'> <p>First name: *</p> <p><label for='firstname'></label><input type='text' name='firstname' maxlength='35' size='50' tabindex='1' /></p> <p>Last name: *</p> <p><label for='lastname'></label><input type='text' name='lastname' maxlength='35' size='50' tabindex='2' /></p> <p>Email address: *</p> <p><label for='email address'></label><input type='text' name='email' maxlength='35' size='50' tabindex='3' /></p> <p>Passsword: *</p> <p><label for='password'></label><input type='text' name='password' maxlength='35' size='50' tabindex='4' /></p> <p>Confirm password: *</p> <p><label for='confirmpassword'></label><input type='password' name='confirmpassword' id="confirmpassword" maxlength='35' size='50' tabindex='5' /></p> <p><input type='submit' name="submit" value='Submit' /></p></form>”;}?>THIS IS THE MySQL CODE I HAVE USED. <?php$mysqli = new mysqli("host name", "xxxxxxxx", "xxxxxxxx", "xxxxxxxx");if ($mysqii->connect_error) {die('Connect Error (' . $mysqli->connect_errno . ') ' //CHECK CONNECTION. . $mysqli->connect_error);}mysql_query("INSERT INTO ws_sessions (user_name, first_name, last_name, email, password, confirm_password) VALUES('$userName', '$firstName', '$lastName', '$email', '$password', '$confirmPassword')");$mysqli->close();?>I hope this is helpful, please feel free to ask me any questions. Thanks!
  7. Hi Guys, After a user fills out a form on a website, and clicks the submit button, the user details such as name, address and telephone numbers, should be sent to and saved on the database, but on checking the database - nothing at all is saved on the database. Any possible suggestions, please help. I can copy and paste the HTML Form code and MySQL if you want. Thanks, Codex...
  8. web applications programming

×
×
  • Create New...