Jump to content

unlishema.wolf

Members
  • Posts

    110
  • Joined

  • Last visited

Everything posted by unlishema.wolf

  1. Your error is probably occurring with this. $GetBio = mysql_query("SELECT bio FROM staff_bio WHERE userid ={$Users['id']}"); $GetBioo = mysql_fetch_assoc($GetBio);
  2. Notice they never got the values in the first place? The code I posted above should fix all the problems. Keyword is "should". Edit: In my post above with the code I also fixed your variables to grab the data from the $_POST
  3. You are posting the $_POST[''] into the database. You need to post your edited information. $sql="INSERT INTO web_articles (ArticleDescription, URL) VALUES ('$ArticleDescription','$URL')"; It should look like: (Note: I added devugging for you) <?php // connection mysql_select_db("doofyd5_comments", $con); echo '$ArticleDescription before changes: "' . $_POST['ArticleDescription'] . '"<br>'; echo '$URL before changes: "' . $_POST['URL'] . '"<br>'; $ArticleDescription=mysql_real_escape_string(mb_convert_encoding($_POST['ArticleDescription'], 'UTF-8', 'UTF-8')); $URL=mysql_real_escape_string(htmlspecialchars($_POST['URL'], ENT_QUOTES)); // ENT_QUOTES converts all quotes to HTML equivalent. ENT_COMPAT converts only Double Quotes. $ArticleDescription=str_replace('\"','"',$ArticleDescription); echo '$ArticleDescription after changes: "' . $ArticleDescription . '"<br>'; echo '$URL after changes: "' . $URL . '"<br>'; $sql="INSERT INTO web_articles (ArticleDescription, URL) VALUES ('$ArticleDescription','$URL')"; if (mysql_query($sql,$con)) { header ("location:desiredurl"); require_once("desiredurl"); exit(); } else { echo "An unexpected error occured."; // ADMIN ERROR MESSAGE //echo mysql_error(); } mysql_close($con) ?>
  4. Yea replace all the `backticks` with 'single quotes' and fix the values you insert (aka you are missing some) and it should work. You may to have reorganize them to insert into the correct columns but it should fix it.
  5. yes it would. You could even make a function to do it so you don't have to post the code multiple times. Note: A little rusty on functions so recode if needed. function getSelectCode($options) { $selectCode = "<select name=\"type\">"; foreach ($options as $key => $value) { $selected = ""; if ($row['type'] == $key) $selected = " selected"; $selectCode .= "<option value=\"{$value}\"{$selected}>{$value}</option>"; } $selectCode = "</select>"; return $selectCode; } I think that is correct. The return statement may be wrong. Just because I have been doing java coding a lot lately lol. @teynon thank you.
  6. $selectCode = "</select>"; should be $selectCode .= "</select>";
  7. You need to add ,'s to the last couple entries. And then the column count is not correct. Did you forget to add some data? It looks to me like you have 26 columns to enter data and you only enter 22 columns of data. Edit: If you can supply what each field should go into. I can help a little more. Giving you the columns you have blank and making sure the order is correct.
  8. you do not have a type defined in a spot.. I added <- HERE to the code for you to see it. CREATE TABLE `ncmr`( `id` INT AUTO_INCREMENT VARCHAR (11), `Added_By` VARCHAR(80), `Added_By_Date` DATE, `Nexx_Part` VARCHAR(60), `Nexx_Rev`(15), <- HERE `Nexx_Part_Description` VARCHAR(90), `NCMR_Qty` VARCHAR(20), `JO` VARCHAR(20), `SN` VARCHAR(20), `INV` VARCHAR(20), `Nexx_Inventory_On_Hand` VARCHAR(20), `Nexx_Inventory_Chk` VARCHAR(20), `Supplier_Name` VARCHAR(60), `Supplier_Number` VARCHAR(60), `Manufacturer_Part_Number` VARCHAR(60), `Manufacturer_Serial_Number` VARCHAR(60), `NCMR_ID` VARCHAR(20), `Nonconformity` MEDIUMTEXT, `Disposition` MEDIUMTEXT, `Comments` MEDIUMTEXT, `CommentsAdditional_Details` MEDIUMTEXT, `PO` VARCHAR(20), `PO_Date` DATE, `Date_Received` DATE, `ncmrsr` MEDIUMTEXT, `ncmrsc` MEDIUMTEXT, PRIMARY KEY (`id`) ) INSERT INTO ncmr VALUES ( `1`, `1054`, `Peter Teigeler`, `7/7/2011`, `K11205368`, `1`, `Assy, CMM Module w/window & Cover`, `2`, `I8778`, `164`, `N/A`, `N/A`, `Plastic Design Inc`, `100255`, `K11205386`, `N/A`, `Not made to print, missing 2 proximity sensor mouting brackets. These need to be welded in place.`, `Return to vendor for rework, or have vendor come in and rework on site.` `N/A` `N/A` `N/A` `N/A` `N/A` );
  9. Ok I have had some bad issues with internet recently. And I have finally found a way to give all the computers in my house internet using ICS. But I have a problem. First I will share the setup: My Host computer is connected to a wireless access point. (Runs Windows XP SP3) I connect my router to my Host coumpter via Ethernet Calbe. (Linksys WRT300n Router) Server computer is connect to the router via Ethernet Cable. (Running Linux Server 10.04.1) My fathers computer is connect to the router via Ethernet Cable. (Runs Windows XP SP3) I am able to access my server computer via SSH and HTTP on my Host computer and my fathers computer. I can access the router's setup via my fathers computer. I can't access my router's setup via my Host computer though. I am not sure if I have a setting wrong or if I just need to use the correct local address. If anybody can help me with this I would be very grateful. I have been search for this method of ICS all day and can't find anything about the Host computer accessing the router. Note: Not sure if I am posting this is the correct section or even if I can post this on this forum. But I am sure there are people that have experience in this field here.
×
×
  • 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.