Jump to content
Killersites Forums

mccorvic

Member
  • Posts

    6
  • Joined

  • Last visited

mccorvic's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I've come across two problems with trying to make a form with textarea. 1. For whatever reason if the form is POST I'll get a MySQL query errory because of text area, but it seems to work fine with a GET form. Any ideas why or does it not really matter in this case and I should just use GET? 2. With text area any time anyone inserts a ' or any kind of html tag (this is a very low tech form) it messes up the php string and gets an error. I was hoping to make this form friendly to those without PHP skills seeing as I'm still a n00blet myself. Suggestions? 3. Or maybe I shouldn't be using textarea at all? Is there another simple tag i should be using? I didn't want to use input field since that seems to give me very limited space to type. Thanks
  2. $query = "SELECT * FROM blog"; $data=mysqli_query($dbc, $query);
  3. Practicing with PHP and trying to rig up a poor man's blog. How can I make a string that will show only the newest five entries I make using a MySQL table? This is what I've kinda come up with: <?php while($row=mysqli_fetch_array($data)) { if($row['id'] < 5) { echo '' . $row['post'] . ' '; echo 'Posted: ' . $row['time'] . ' by ' . $row['name'] . ''; }} ?> But obviously this will only show the first 5 entires I've made and nothing else. Like I said, I'm just trying to get a proof of concept thing going, so I'm not worried about making the best and cleanest bog php ever. Suggestions?
  4. Thank you so much. I was about to go insane
  5. First, sorry if this is a common question. I really don't know what I'm looking for and have, thus far, been unable to find anything that really answers it. I'm very new to web design and have come across this issue: when designing a "navigation bar" for my web page is copying and pasting the code onto every page truly the best way to go about things? Even on a small, sample web page I was playing with it became a hassle when I changed the location of one page file to go back and edit every single web page to make sure the navigation worked. I imagine there is some way to make this process simpler, but I just do not know what it is at all. For example, maybe there is some code (java, php?) that lets me make on, common page for all navigation and every webpage just looks to that one code to load that navigation bar. Hopefully this question makes sense as it is driving me crazy. Thanks for all your help.
×
×
  • Create New...