| | |
problem with $_post
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2007
Posts: 10
Reputation:
Solved Threads: 0
Here is the real code "product name" was just an example.
This is the part of the input form;
Here is a some code from the processing form which adds user input to the database;
This is the part of the input form;
HTML and CSS Syntax (Toggle Plain Text)
echo "<select name='type'>"; include("mysql_conn.php"); include("db_conn.php"); // Get a specific result from the "type" table $result = mysql_query("SELECT * FROM type") or die(mysql_error()); while($row = mysql_fetch_array( $result )) { $type = $row['type']; echo "<option value=$type>$type</option>"; } echo "</select>";
HTML and CSS Syntax (Toggle Plain Text)
$prod_type = $_POST['type']; $qry = "INSERT INTO products(prod_name, prod_desc, prod_skincond, prod_application, prod_benefits, prod_type, prod_price, prod_img, prod_size, prod_code) VALUES('$prod_name','$prod_desc','$prod_skincond','$prod_application','$prod_benefits','$prod_type','$prod_price','$img','$prod_size','$prod_code')"; $result = @mysql_query($qry);
•
•
•
•
HTML and CSS Syntax (Toggle Plain Text)
echo "<select name='type'>"; include("mysql_conn.php"); include("db_conn.php"); // Get a specific result from the "type" table $result = mysql_query("SELECT * FROM type") or die(mysql_error()); while($row = mysql_fetch_array( $result )) { $type = $row['type']; echo "<option value=$type>$type</option>"; } echo "</select>";
php Syntax (Toggle Plain Text)
while($row = mysql_fetch_array( $result )) { $type = $row['type']; echo "<option value=\"$type\">$type</option>"; }
Another thing you can try is, on the page that you post this form to, at the top:
php Syntax (Toggle Plain Text)
echo "<pre>"; print_r($_POST); echo "</pre>"; die();
$me = new Person();
if (isset($_COOKIE)){
$me->eat($_COOKIE);
} else { $me->starve(); }
if (isset($_COOKIE)){
$me->eat($_COOKIE);
} else { $me->starve(); }
•
•
Join Date: May 2008
Posts: 66
Reputation:
Solved Threads: 1
All variables have a limit on the legth of values it can hold. If you are using Joomla or another CMS then often restrictions are placed and you can only post values using the methods designated in the API.
Kronik Media: Web design Company in London, UK.
Our Websites:
Estate Agent Website
Search engine marketing & eCommerce Resources for business
Our Websites:
Estate Agent Website
Search engine marketing & eCommerce Resources for business
![]() |
Similar Threads
- $PHP_SELF within html form question (PHP)
- updating multiple columns in single MySQL table (PHP)
- serch text file (PHP)
- Problem with $_POST (PHP)
- PHP sessions/$_POST problem. Too Stressed today! (PHP)
- paging & _POST variables (PHP)
- bar graph & _POST variables (PHP)
- Problems with uising arrays and $_POST variables (PHP)
- search and results problem (PHP)
Other Threads in the HTML and CSS Forum
- Previous Thread: Create fields using <option> tags
- Next Thread: how do thay get twitter id to show up in link?
Views: 380 | Replies: 5
| Thread Tools | Search this Thread |
Tag cloud for HTML and CSS
2002 appointments asp background backgroundcolor beta browser bug calendar cart center cgi code codeinjection corporateidentity create css deleted design development displayimageinsteadofflash dreamweaver drupal emailmarketing epilepsy explorer firefox flash font fonts form format free frontpage google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft missing mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization perl pnginie6 positioning problem scroll seo shopping studio swf swf. templates textcolor theme timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7 wordpress xml xsl





