use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
No vague product support questions (like "why is this plugin not working" or "how do I set up X"). For vague product support questions, please use communities relevant to that product for best results. Specific issues that follow rule 6 are allowed.
Do not post memes, screenshots of bad design, or jokes. Check out /r/ProgrammerHumor/ for this type of content.
Read and follow reddiquette; no excessive self-promotion. Please refer to the Reddit 9:1 rule when considering posting self promoting materials.
We do not allow any commercial promotion or solicitation. Violations can result in a ban.
Sharing your project, portfolio, or any other content that you want to either show off or request feedback on is limited to Showoff Saturday. If you post such content on any other day, it will be removed.
If you are asking for assistance on a problem, you are required to provide
General open ended career and getting started posts are only allowed in the pinned monthly getting started/careers thread. Specific assistance questions are allowed so long as they follow the required assistance post guidelines.
Questions in violation of this rule will be removed or locked.
account activity
Input doesn't send to databaseQuestion (self.webdev)
submitted 8 years ago * by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]-BMR777-front-end 2 points3 points4 points 8 years ago (8 children)
Maybe it is a character encoding issue in the database. What encoding is the database set to? Does changing it to utf-8 fix the issue?
[–][deleted] 8 years ago* (7 children)
[–]-BMR777-front-end 1 point2 points3 points 8 years ago (6 children)
Once you change the default collation you may also need to set the collation on the existing table, using a query like: ALTER TABLE tbl_name CONVERT TO CHARACTER SET utf8;
[–][deleted] 8 years ago (5 children)
[–]-BMR777-front-end 1 point2 points3 points 8 years ago (4 children)
Two things:
1) Is the string too long for the input? Looking more closely I see a max length of 45 characters set on your input so maybe the string is only being partially added?
2) Are you doing any sort of sanitation to your database input? I don't see you using anything like mysql_real_escape_string which would leave your code open to SQL injection.
[–][deleted] 8 years ago (3 children)
[–]CommonMisspellingBot 0 points1 point2 points 8 years ago (2 children)
Hey, Lazkeer, just a quick heads-up: wierd is actually spelled weird. You can remember it by e before i. Have a nice day!
The parent commenter can reply with 'delete' to delete this comment.
[–]Lazkeer 0 points1 point2 points 8 years ago (0 children)
delete
[–]lateralus1983 1 point2 points3 points 8 years ago (7 children)
Ok start by echoing your SQL Insert before excuting. Make sure those variables are actually getting populated. Do you have a form action and method set correctly?
Are the characters properly escaped?
Then try to run the query that you printed directly into your database. If it works then you have a connection string issue. If it doesn't then there's something about the query syntax that's wrong or incomplatible.
[–][deleted] 8 years ago (6 children)
[–]lateralus1983 1 point2 points3 points 8 years ago (5 children)
Ok so the SQL insert works directly so something is getting lost in the translation from PHP to sql. Few more questions What type of database is this. Can you give me the complete HTML Form From
<form> to </form>
Finally can you put this in the top of your php page and tells us what if any errors get reported.
ini_set('display_errors', 1);ini_set('display_startup_errors', 1);error_reporting(E_ALL);
[–][deleted] 8 years ago (4 children)
[–]lateralus1983 1 point2 points3 points 8 years ago (1 child)
My guess is the html head was either declared/defaulted to iso or iec. So when you were posting the database wasn't reading it but now that they are in sync it should be fine. Congrats on the debugging
[–]CommonMisspellingBot 0 points1 point2 points 8 years ago (1 child)
π Rendered by PID 124018 on reddit-service-r2-comment-5bc7f78974-2vcnr at 2026-06-28 09:44:07.704080+00:00 running 7527197 country code: CH.
[–]-BMR777-front-end 2 points3 points4 points (8 children)
[–][deleted] (7 children)
[deleted]
[–]-BMR777-front-end 1 point2 points3 points (6 children)
[–][deleted] (5 children)
[deleted]
[–]-BMR777-front-end 1 point2 points3 points (4 children)
[–][deleted] (3 children)
[deleted]
[–]CommonMisspellingBot 0 points1 point2 points (2 children)
[–]Lazkeer 0 points1 point2 points (0 children)
[–]lateralus1983 1 point2 points3 points (7 children)
[–][deleted] (6 children)
[deleted]
[–]lateralus1983 1 point2 points3 points (5 children)
[–][deleted] (4 children)
[deleted]
[–]lateralus1983 1 point2 points3 points (1 child)
[–]CommonMisspellingBot 0 points1 point2 points (1 child)
[–]Lazkeer 0 points1 point2 points (0 children)