0
PHP & MySQL insert question
New Here
,
/t5/dreamweaver-discussions/php-mysql-insert-question/td-p/2709070
May 24, 2010
May 24, 2010
Copy link to clipboard
Copied
I have a form that is inserting a selected color (e.g., #663300). I want to insert the value into the database without the "#". How do I delete that and just insert the actual numbers into the database?
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

/t5/dreamweaver-discussions/php-mysql-insert-question/m-p/2709071#M159941
May 24, 2010
May 24, 2010
Copy link to clipboard
Copied
I just did a quick search on google for php strip characters and found some intersting results.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

/t5/dreamweaver-discussions/php-mysql-insert-question/m-p/2709072#M159942
May 31, 2010
May 31, 2010
Copy link to clipboard
Copied
Let's say your color code is in $color_data variable:
INSERT INTO color_table(color_code) VALUES(SUBSTRING('{$color_data}', 2))
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

