Jump to content

KruSuPhy

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

KruSuPhy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. it does, but would i have $query = "UPDATE sections SET id = 1 WHERE name = 'name' "; mysql_query( $query ) or die( mysql_error() );]/php]
  2. Well basically I'm just trying to get a basic jeopardy game with the main page, admin access to change questions and sections, and... that's about it. from there i'll make it pretty with nice features like team setup and all that nonsense. for now i just have a form with text fields that let the person type in text(obv) then sends that text to the database to be received by the main question page. i think.
  3. already in the database there's the column ID and name, with rows 1 2 3 4 5 for id, and one two three four five for name. Can you tell me how exactly i should assign an id(1-5) to the name that i'm editing? currently i have a form with five text fields for the name of the categories. How would i get a specific id to each text field? If i did wrong what I think i did, I'll feel like a complete moron, so i'd rather not say what i did exactly
  4. <?php include 'jepconfig.php'; $name=$_POST['secname']; $idnum=$_POST['idnum']; $query="INSERT INTO sections (name) VALUES (".$name.") WHERE id= .$idnum."; $result = mysql_query($query) or die( mysql_error() ); ?> basically what i had before, just with what i was told to change, couldn't see anything else that should be modified... i have five rows, each with an ID from 1 to 5(there will be 5 categories in the game). this should send the category name to 'name' in `sections` where the ID is the same as the field.
  5. what is a literal? And i did what you guys said, but im getting some other error i can't figure out now.. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE id= (5)' at line 1 I don't even know what's in any of my line 1s that could cause an error...
  6. that means it puts two strings together, right? Why would it be needed in this case?
  7. @Muddy; What are the periods in the names for? edit; @anyone really, what are the periods for? are they needed?
  8. Hey guys, I'm making a jeopardy game in PHP to better myself. I've been working on it for a couple days, and i ran into a problem making an Edit category Name system. i can connect to the db fine, and insert data fine, but i can't figure out how to make it send all five textfields to their ID spot in `sections`. I have id's one through five, but i can't figure out how to send it all to the database. i get some unexpected T_VARIABLE error on line 7, which is <?php include 'jepconfig.php'; $name=$_POST['secname']; $idnum=$_POST['idnum']; $query="INSERT $name INTO sections WHERE id="$idnum"" $result = mysql_query($query) ?> I may have done something wrong in that one, but nothing else i tried has worked either. Can someone help? I can upload the game of what i have so far if needed.
  9. You guys know those mafia games like themafiaboss.com and whatnot? I've seen a couple that look almost exactly alike, and I was wondering if that meant there was some sort of source code available for download. i looked around the net and couldn't find one, but i didn't know if yousguys would know where I could find one if there's one to be found. I've been interested in programming one of these games to help better my php skills. I learn better if i can work on a project and read from it, and that's a project i was wanting to find.
  10. for some reason, it's under 127.0.1.1/phpmyadmin - idk why. i don't think i made a typo in anything?
  11. I followed a tutorial http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-ubuntu-9.10-lamp <-- here to install php and apache and mysql and phpmyadmin, etc etc. at one point it tells me to go to an ip address to look for the "it works" message. 127.0.0.1 - it works! at another point, it tells me to go to ip/phpmyadmin. so i go to 127.0.0.1/phpmyadmin - not found. can anyone tell me where i went wrong from the tutorial?
×
×
  • 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.