Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

hsmoore.com

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    hsmoore.com got a reaction from rallport in Dependable Dropdown   
    Nobody's answering your thread because you're basically asking someone to do it for you rather than researching online and trying out some more javascript/jquery interactions with your dropdowns.
  2. Like
    hsmoore.com got a reaction from Frisby in PNG Resampling Program not working.   
    Here's a function you can use to rather pass the image and dimensions you want output!
     

    function resizeImage($image, $width, $height){ $tmp = split("\.", basename($image)); $ext = $tmp[1]; $src_img = ""; foreach($tmp as $t) { $ext = $t; } switch( $ext ){ case "jpg": case "JPG": case "jpeg": case "JPEG": $src_img = imagecreatefromjpeg($image); break; case "png": case "PNG": $src_img = imagecreatefrompng($image); break; } $dst_img = imagecreatetruecolor($width, $height); $src_dimensions = getimagesize($image); $src_width = $src_dimensions[0]; $src_height = $src_dimensions[1]; //proportions $prop_src = $src_width/$src_height; $prop_dst = $width/$height; //automate if($prop_src > $prop_dst){ $dst_height = $height; $dst_width = $src_width*$height/$src_height; //crops positions $prop_crop = $src_height/$height; $src_point_x = abs($src_width-$width*$prop_crop)/2; $src_point_y = 0; }else{ $dst_width = $width; $dst_height = $src_height*$width/$src_width; //crops positions $prop_crop = $src_width/$width; $src_point_x = 0; $src_point_y = abs($src_height-$height*$prop_crop)/2; } //application of the parameters imagecopyresized($dst_img, $src_img, 0, 0, $src_point_x, $src_point_y, $dst_width, $dst_height, $src_width, $src_height); imagecopyresampled($dst_img, $src_img, 0, 0, $src_point_x, $src_point_y, $dst_width, $dst_height, $src_width, $src_height); switch( $ext ){ case "jpg": case "JPG": case "jpeg": case "JPEG": imagejpeg($dst_img, $image); break; case "png": case "PNG": imagepng($dst_img, $image); break; } }
  3. Like
    Create a config.php file:
     

    <?php $DB_HOST = "localhost"; $DB_USER = "root"; $DB_PASS = "password"; $DB_DBNAME = "database_name"; mysql_connect($DB_HOST, $DB_USER, $DB_PASS); mysql_select_db($DB_DBNAME); ?>
     
    Then just use it!
     

    <?php include ("config.php") $query = mysql_query("SELECT * FROM `sometable`"); while ($result=mysql_fetch_object($query)) { echo $result->columnname."<br/>"; } ?>
     
    This way you dont have to reconnect and reconnect all the time!
  4. Like
    hsmoore.com got a reaction from Jo 90 in PNG Resampling Program not working.   
    Here's a function you can use to rather pass the image and dimensions you want output!
     

    function resizeImage($image, $width, $height){ $tmp = split("\.", basename($image)); $ext = $tmp[1]; $src_img = ""; foreach($tmp as $t) { $ext = $t; } switch( $ext ){ case "jpg": case "JPG": case "jpeg": case "JPEG": $src_img = imagecreatefromjpeg($image); break; case "png": case "PNG": $src_img = imagecreatefrompng($image); break; } $dst_img = imagecreatetruecolor($width, $height); $src_dimensions = getimagesize($image); $src_width = $src_dimensions[0]; $src_height = $src_dimensions[1]; //proportions $prop_src = $src_width/$src_height; $prop_dst = $width/$height; //automate if($prop_src > $prop_dst){ $dst_height = $height; $dst_width = $src_width*$height/$src_height; //crops positions $prop_crop = $src_height/$height; $src_point_x = abs($src_width-$width*$prop_crop)/2; $src_point_y = 0; }else{ $dst_width = $width; $dst_height = $src_height*$width/$src_width; //crops positions $prop_crop = $src_width/$width; $src_point_x = 0; $src_point_y = abs($src_height-$height*$prop_crop)/2; } //application of the parameters imagecopyresized($dst_img, $src_img, 0, 0, $src_point_x, $src_point_y, $dst_width, $dst_height, $src_width, $src_height); imagecopyresampled($dst_img, $src_img, 0, 0, $src_point_x, $src_point_y, $dst_width, $dst_height, $src_width, $src_height); switch( $ext ){ case "jpg": case "JPG": case "jpeg": case "JPEG": imagejpeg($dst_img, $image); break; case "png": case "PNG": imagepng($dst_img, $image); break; } }
  5. Like
    hsmoore.com got a reaction from Pondering tea drinker in Securing a guestbook script   
    This is called "sanitizing" your form data and should always be done before inserting the data directly to your database.
    Take a look at this site for some examples, it covers multiple languages too! bobby-tables.com

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.