Jump to content


  • Posts

  • Joined

  • Last visited

Contact Methods

  • AIM
  • Website URL

Profile Information

  • Location
    E Town, Connecticut

dubesinhower's Achievements


Newbie (1/7)



  1. right now, i don't have much user input on my site. but soon, i want to add a search function. basically, i'm worried about the security of my site against xss and sql injection.is there a simple php framework i can implement that will reduce the effectiveness of these attacks? i'd rather not have a giant framework, i'm just looking for something small but effective.
  2. bingo. that did the trick!thanks again lol
  3. i have verified it. it outputs string(19) "2011-07-23 00:00:00"
  4. my $row['Date'] variable should be the date attribute from my database, which is a datetime data type. i'd like it to just display the date in this format: Sun, Jul 24 2011. not sure why the error i get says it's looking for datetime when it should already be in that data type.
  5. i'm using an array to display different variables from mysql entries. i'm trying to display the date, but it keeps giving me an error:Warning: date_format() expects parameter 1 to be DateTime, string given in (blah) on line (blah)what's the best way for me to display the time using arrays? my relevant code is below. <?php require("scripts/config.php"); mysql_connect($db_host, $db_user, $db_password) or die(mysql_error()); mysql_select_db($db_database) or die(mysql_error()); if(isset($_GET['pagenum'])) { $pagenum = $_GET['pagenum']; } else { $pagenum = 1; } $result = mysql_query('SELECT ID FROM linkstab') or die(mysql_error()); $num_rows = mysql_num_rows($result); $page_rows = 4; $last = ceil($num_rows/$page_rows); if ($pagenum < 1) { $pagenum = 1; } elseif ($pagenum > $last) { $pagenum = $last; } $max = 'LIMIT ' .($pagenum - 1) * $page_rows .',' .$page_rows; $result_p = mysql_query("SELECT * FROM linkstab ORDER BY ID DESC " . $max) or die(mysql_error());?><?php while ($row = mysql_fetch_array($result_p)) { echo '<div class="contentBlock bar">'; echo '<div class="contentDesc">'; echo '<dl>'; $linkdate = $row['Date']; echo '<dt><a href="', $row['Website'], '" >', $row['Name'], '</a> - ', DATE_FORMAT($linkdate, '%a'), '</dt>'; //here's where i'd like the date echo '<dd>', $row['Description'], '</dd>'; echo '</dl>'; echo '</div>'; echo '<a class="contentBack" href="', $row['Website'], '" style="background-image:url(', $row['Image'], ')"></a>'; echo '</div>'; } mysql_free_result($result); mysql_close();?>
  6. prettycoollinks.comi'm still working on it, but it uses html, css, javascript, php, and mysql. i'm in the process of developing a simple content management system for it, so it's going to get more functionality and content soon.what does everyone think?
  7. brilliant. the generic user that i created didn't have enough permissions. thanks for the help!
  8. i tested my script for my website on my local machine (setup with xampp), and it works fine.so i uploaded it to my website today, and it gives two errors. long story short, i made a test page that removed all the html from the php script. <?php ob_start(); ?><?php $db_host = 'localhost'; $db_user = ''; $db_password = ''; $db_database = ''; mysql_connect($db_host, $db_user, $db_password); mysql_select_db($db_database); $result = mysql_query('SELECT * FROM linkstab ORDER BY ID Desc'); ?> <?php print_r(mysql_fetch_array($result)); /*while ($row = mysql_fetch_array($result)) echo $row['Website'], $row['Name']; echo $row['Description']; mysql_free_result($result); mysql_close();*/ ?><?php ob_end_flush(); ?> the website and error are located here hometest.phpfor some reason, it doesn't like the array that i set up to display the $result query information.does anyone have any suggestions?
  9. dubesinhower

    .html vs .php

    i'm creating a small web app using html and php. what are the advantages of having .html files versus .php files? does one have better seo? what's the best (or most popular) way to include simple php with html?
  10. ugh. should i work on creating the description divs first? i'm just kinda stuck on how to build this. i need to create more divs and make them invisible until you mouseover, right?edit: i'm stuck. i'm creating a div to hide over the image links, but the width is too long D= Pretty Cool Linksedit edit: fixed the above issue with the width, but still not sure where to go from here.
  11. okay, working on the background now. i've tried to use jquery in the past, but i had trouble weeding through all the plugins. guess it's time to try again!
  12. not really, but i have a lot of free time lol. ive messed around with some lamp pre-packaged stuff though.
  13. i'm making a personal site so i can share websites that i think are cool to the web. i need to make some sort of simple content management system, so each time i add a new link, i don't have to restyle the whole site. also, it would be a way to archive old links.i want to be able to display 5 links at a time, starting with the newest one. when i add a new one, the old ones move down a spot, with all the old links (after the 5th one on the page) going to the next page.to aid in visualizing what i mean, take a look at the page currently. there is no javascript yet, just basic html and css for 5 links stylized the way i eventually would like them to look.Pretty Cool Linksi'm not sure how i should go about doing this. i don't want something overly complicated, but i'm sure what i want is not possible to do using html and css alone.if anyone has any ideas, i would be really appreciative :)thanks in advanced!
  14. i want to add some hover animations to my site. i have some images set as backgrounds to divs that are links to web pages. i would like to be able to hover over a link, and a description of the link slides out (preferably within the div). then, when you stop hovering, it slides away.it doesn't necessarily even have to animate. if i can have descriptions pop up when i hover, i'll be happy lol.to get a better idea, here's where i'm at so far.pretty cool linksthanks in advanced for any tips!edit: this is where i got my original inspiration: unaghii
  15. im working on a new site that removes the resume and provides less personal info.
  • Create New...