Jump to content

cyberRobot

Moderators
  • Posts

    3,145
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by cyberRobot

  1. In your form tag, don't you need the action attribute: [code] <form method="POST" action="<?php $_SERVER['PHP_SELF']; ?>"> ... [/code]
  2. [!--quoteo(post=376051:date=May 22 2006, 10:12 AM:name=glenelkins)--][div class=\'quotetop\']QUOTE(glenelkins @ May 22 2006, 10:12 AM) [snapback]376051[/snapback][/div][div class=\'quotemain\'][!--quotec--] why dont you try something like this: [code] $name[0] = "Bob"; $org[0] = "Builders Ltd"; $title[0] = "Mr"; $email[0] = "bob@buildersltd.com"; $phone[0] = "01578968345"; for ($i=0; $i < $number_of_inserts; $i++) { mysql_query ("INSERT INTO authors VALUES ('$name[$i]','$org[$i]','$title[$i]','$email[$i]','$phone[$i]'"); $id_list[$i] = mysql_insert_id(); } foreach ($id_list as $id) { echo $id . "<br>"; } [/quote] I already have something like that, but I would like to get away from all the for loops. I have one loop to read the info from the online form, another to store the info to the database, and another one to strip the slashes from the input and print the info to the screen.
  3. Is there any way to get multiple IDs when performing an INSERT statement which inserts more than one row? Our INSERT statement looks something like: [code] INSERT INTO authors (name, org, title, email, phone) VALUES ('name1', 'org1', 'title1', 'email1', 'phone1'), ('name2', 'org2', 'title2', 'email2', 'phone2'); [/code] I normally use: [code] mysql_insert_id() [/code] ...to get the insert id, but this only gives me the ID for the first insert. Thanks
  4. So where did you find this Application Data directory? I did a search of my C drive and only found two CodeColoring.xml files. Both under C:\Program Files\Macromedia\Dreamweaver MX 2004\ I changed both files as "davidennis99" instructed and no luck. With the exception of: "To change the colors: edit->preferences->Color COding->HTML->PHP NOT edit->preferences->Color COding->PHP (this will just change the colors in .php-ish named files, not html files.."
×
×
  • 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.