Jump to content


  • Posts

  • Joined

  • Last visited

About darbok

  • Birthday 02/10/1975

Profile Information

  • Location
    Auburn NY

Contact Methods

  • Skype

Recent Profile Visitors

1,940 profile views

darbok's Achievements


Newbie (1/7)



  1. darbok

    php form and mysql

    So it's best to just it up and list all the fields?
  2. darbok

    php form and mysql

    I think i explained myself wrong possibly. I understand about submitting to mysql from php... but from what iv'e seen you need to list all the columns in the sql tables that the info has to go in from the php form. I was wondering if there was some way to do this without having to list all 30 fields that the php/sql connect statement has to post to individual.
  3. darbok

    php form and mysql

    I was wondering when one has a php form with like 30 entries how does one organize or manage such a large list of entries to pass to mysql?
  4. darbok

    connect statement

    I feel stupid, I can't figure out why i kept getting the error message "is currently unable to handle this request."
  5. darbok

    connect statement

    <?php $con = mysqli_connect("localhost","mark","library","markdb"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $sql = "INSERT INTO UserNames (FirstName, LastName) VALUES ('John', 'Doe')"; if ($conn->query($sql) === TRUE) { echo "New record created successfully"; } else { echo "Error: " . $sql . "<br>" . $conn->error; } $conn->close(); ?> i have my table set to varchar (16)
  6. is there a way to make a singular login for a wordpress website that also logs a person into the forums and the wiki at the same time?
  7. darbok

    connecting to msqli

    Looking at how form items are put into a mysql table, the part that seems daunting is if ones form has like 50 items... having to list all those IDs with their variables makes me wonder if there is a better way or if its just " it up buttercup.".
  8. I ment linebreak not pagebreak.
  9. how can i put a pagebreak between these? echo $phone = 3152245368; echo $phone = 3156045555;
  10. what is the best method for getting data from a form to a mysql DB? Post? get? request? thanks
  11. I'm getting a resource #4 error, not sure how to fix it, but i bet its an easy fix that i'm not seeing. <?php $result=mysql_query("SELECT * FROM topdata a, venuetop b, stats c, mid_data d, influence e, botdata f, accounts g WHERE (a.char_name=b.char_name) AND (b.char_name=c.char_name) AND (c.char_name=d.char_name) AND (d.char_name=e.char_name) AND (e.char_name=f.char_name) AND (f.char_name=g.log_name) AND (a.char_name="$_POST[char_name]")") or die ("Couldn't get character data.<br>".mysql_error()."<br>Please contact Savvannis with your login name, character name, the above error and the page address above."); $row=mysql_fetch_array($result); echo $result; ?>
  12. thanks for the help, much appreciated, the hints and such were a good deal. To make it work I turned it into two files, one for the form and one for the php, I also changed the SQL column names to be one word all lower case instead of two words uppercase. I also took the single quote marks out of my column names.
  13. this is the error I get now. Parse error: syntax error, unexpected ';' in C:xampphtdocspracticeformspracticeforms.php on line 24 though i think it's gotten better. <!doctype html> <html> <head> <link rel="stylesheet" href="style.css"> <meta charset="utf-8"> <title> My Practice Page </title> </head> <body> <?php $first_name = $_POST["firstname"]; $last_name = $_POST["lastname"]; $city = $_POST["city"]; $db = MYSQLI_CONNECT('localhost','root','','practiceforms'); if (!$db) { die("Connection failed: " . mysqli_connect_error()); } echo 'Connected successfully'; if(isset($_POST['first_name']) && isset($_POST['last_name']) &&(isset($_POST['city'])); { $sql = "INSERT INTO users ('FIRST NAME', 'LAST NAME', 'CITY') VALUES ('$first_name','$last_name','$city')"; } mysqli_query($db, $sql); mysqli_close($db); ?> <form method="post" action=""> First Name:<br> <input type="text" name="firstname" value=""> <br> Last Name:<br> <input type="text" name="lastname" value =""><br> City:<br> <input type ="text" name="city" value=""> <br> <input type="submit" name="submit" value="submit"> </form> </body> </html>
  14. I see I think. I guess I was just trying to make a simple form to practice doing the basics of putting something into a table.
  • Create New...