Jump to content

pfkdesign

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Everything posted by pfkdesign

  1. hi everybody, i made get_menu_id function : <?php function get_menu_id($menu) { $result = mysql_query("SHOW TABLE STATUS LIKE 'menu'"); $rows = mysql_fetch_assoc($result); return $rows['auto_increment']; } echo get_menu_id() ?> this is return the next auto_increment id in the mysql table (5.0.5a), PROBLEM ! when i check it on local server(localhost) i dont have any problem and i 'm getting the next id , but as soon as i upload in my server i will get the warning. here are the warning: Warning: Missing argument 1 for get_menu_id(), Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource any idea? tnx
  2. send the code plz (the form)
  3. did you change the form value or name of the element=(list/menu or checkbox)?
  4. "county " specifying the name of the multiple selection element and "," the delimiter to use. <? if (isset($insNumRows)) { for ($I=1; $I<=$insNumRows; $I++) { if (isset($_POST["county$I"]) && is_array($_POST["county$I"])) { ---------------------------^ name of your menu/list---------^ $_POST["county$I"] = implode(",", $_POST["county$I"]); -----------------^ name of your menu/list ------------^ $HTTP_POST_VARS["county$I"] = $_POST["county$I"]; ------------------------------^ name of your menu/list---^ } } } ?> and in your form --> if the name of the filed is "county", you will change it as "county[]" otherwise php will recognize only one selection.
  5. no you don't need another database, it will store all in one filed of your table and all of your entry, will separate by "," comma. regards
  6. hi use comma-separate-list or checkbox to insert, <? if (isset($insNumRows)) { for ($I=1; $I<=$insNumRows; $I++) { if (isset($_POST["county$I"]) && is_array($_POST["county$I"])) { $_POST["county$I"] = implode(",", $_POST["county$I"]); $HTTP_POST_VARS["county$I"] = $_POST["county$I"]; } } } ?> regards
  7. hi, so it will be in one inset operation or first i insert then update the form and it will update the field of c_id? ( i would like all in one operation) tnx
  8. hi guys, i have a problem and i don't know how to solve it ??? :'(, i would like to copy the value of id (which is auto-increment) to another field on the same table "when i inserting a record". ex: | table | -------------------- i would like to copy "id" to "c_id" when i insert record | id int A.PK | | c_id int | | label | -------------------- thank you in advance.
×
×
  • 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.