Jump to content

dreadrocky

Members
  • Posts

    20
  • Joined

  • Last visited

About dreadrocky

  • Birthday 04/14/1991

Previous Fields

  • Languages
    HTML, CSS, Javascript, PHP, MySQLi

Contact Methods

  • Website URL
    http://www.foreverlegendary.com

dreadrocky's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I feel so ignorant.. It really must be all the stress. But I got it. Simple replace string. Thank you all again. This case is closed. Gahh PHP and those simple mistakes >_>
  2. That does actually make a lot of sense. But I am having an issue. I don't know what do to... How do I change the apostrophe to something else? I tried a few things, but this is the most recent one I tried.... $to = $_POST['to'];$from = $_POST['from'];$msg = $_POST['message'];mysqli_query($con,"INSERT INTO messages (to, from, message)VALUES ('" .$to. "', '" .$from. "', '" .$msg. "')");
  3. I actually can not believe I didn't think of the " ' " before. I wasn't even reading what you said correctly. That is such a small mistake. One thing I hate most about PHP is its always something so very small that corrupts the whole thing. That may or may not be that issue. I will actually look into that in a couple hours. On that note, I am sorry I haven't replied to any of this very well, I haven't had time to test any of it because of some personal events. But I will check into it now, it could very easily be just that. If it is, or if it isn't, I -will- get back to you guys tonight. Thank you all, so much for your patience with me.
  4. Sure why not. I was going to look into that stuff soon. Cause it'll be a point to have it when its all done. But I'll go ahead and do that now just in case.
  5. Oh well of course thank you for all that information. That's not quite the case either. Only myself and two other people have used this. So it's not like someone trying to hack into it, they all have access to everything. But for some unknown reason it wont post it when we write too much, and more often than not we do write more than 200 characters. - I asked some people at stackoverflow, but I got blocked for asking this question. I don't really know where else to turn, cause to me, looking at this code should work perfectly fine. I was wondering if it could be hostgator or something. So this website is pretty much my last hope. If anyone could refer me to another website would be helpful as well.
  6. Okay, I will review those links in just a moment. Would you mind explaining what SQL injection is? and is that my underlining problem that I need to fix?
  7. I don't get an error at all. Everything works naturally. I fill out the form. I send it off. But when I fill out textarea if it holds more than like 200 characters the whole thing goes to waste... And by that I mean nothing gets inserted not just the text from textarea, but the whole to, from, subject, and message is not in my database.
  8. <form method='post' action='send.php'><label>To :</label><br><input type="text" name="to" placeholder="To"><label>From :</label><br><input type="text" name="to" placeholder="From"><label>Subject :</label><br><input type="text" name="to" placeholder="Subject"><textarea name="message"></textarea> <?php$to = $_POST['to'];$from = $_POST['from'];$subject = $_POST['subject'];$message = $_POST['message'];$con=mysqli_connect("example.com","peter","abc123","my_db");// Check connectionif (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error();}mysqli_query($con,"INSERT INTO messages (to, from, subject, message)VALUES ('$to', '$from', '$subject', '$message')");mysqli_close($con);?> This is just a code thrown together really quick. This is exactly how I would do it, without all the perfecting of the way it looks. I simply don't have my own code anymore. Because I removed it awhile back seeing as I couldn't find a solution to it.
  9. Still looking for an answer.. The above response might have answered my question, but I don't fully understand. I use longtext in my database so limitations shouldn't be an issue I wouldn't think. If I inserted from my database, it would work perfectly fine. But using PHP to insert it is still an issue. Can someone help?
  10. Also, if it were the limitations, I believe it would still post, but cut some of the text out. Because I have had that problem with VarChar, but it still posted. My issue right now is it wont post anything at all, then all that data is lost.
  11. I use 'longtext' in my database. I am now going to review the links you sent me. I just wondered if it would help at all. I am not very interested in a chat system, I only had it that way attempting to fix the first issue.
  12. dreadrocky

    PHP Insert Into

    I can't seem to find an answer for my issue. Hopefully one of you can.. My issue is using textarea to insert data into my database. Anything past about 200 characters will not post. So I usually have to limit the amount. It is pretty useless in many occasions. But not only that, if I post too quickly like a chat window posting only a hundred characters at a time, will not post if I posted too quickly. Any ideas or solutions are welcome, even if your not sure yourself. I might could make use of it. Thank you in advance.. So.. I used HTML forms, PHP Insert Into, and phpMyAdmin. Working on hostgator. If that information helps at all..
×
×
  • Create New...