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.

Bruno Leite

Members
  • Joined

  • Last visited

Everything posted by Bruno Leite

  1. Bruno Leite posted a topic in Frontend
    I've been looking around for some Text Resizer, for a accessibility website. I wanted it to be cookie enabled, so as soon as the user clicked on a link the text size would be the same as the last page. Now I can find text resizers, the problem, is, the ones that are cookie enabled only seem to allow 3 types of size text, small, medium or large, I found some nice text resizer that will allow you to see it at your own will, with + and - signs. The problem is with those ones I can't find one that is cookie enabled. Help?
  2. Thumbs up guys, cheers for that, worked perfectly, and so simple.
  3. I've used this code to upload images but if you press upload file without browsing anything it says upload successfully anyway. How can I change it so that when you press upload without having browsed anything or chosen anything it returns a error message. <?php //define a maxim size for the uploaded images in Kb define ("MAX_SIZE","100"); //This function reads the extension of the file. It is used to determine if the file is an image by checking the extension. function getExtension($str) { $i = strrpos($str,"."); if (!$i) { return ""; } $l = strlen($str) - $i; $ext = substr($str,$i+1,$l); return $ext; } //This variable is used as a flag. The value is initialized with 0 (meaning no error found) //and it will be changed to 1 if an errro occures. //If the error occures the file will not be uploaded. $errors=0; //checks if the form has been submitted if(isset($_POST['Submit'])) { //reads the name of the file the user submitted for uploading $image=$_FILES['image']['name']; //if it is not empty if ($image) { //get the original name of the file from the clients machine $filename = stripslashes($_FILES['image']['name']); //get the extension of the file in a lower case format $extension = getExtension($filename); $extension = strtolower($extension); //if it is not a known extension, we will suppose it is an error and will not upload the file, //otherwise we will do more tests if (($extension != "jpg") && ($extension != "jpeg") && ($extension != "png") && ($extension != "gif")) { //print error message echo '<h1>Unknown extension!</h1>'; $errors=1; } else { //get the size of the image in bytes //$_FILES['image']['tmp_name'] is the temporary filename of the file //in which the uploaded file was stored on the server $size=filesize($_FILES['image']['tmp_name']); //compare the size with the maxim size we defined and print error if bigger if ($size > MAX_SIZE*1024) { echo '<h1>You have exceeded the size limit!</h1>'; $errors=1; } //we will give an unique name, for example the time in unix time format $image_name=time().'.'.$extension; //the new name will be containing the full path where will be stored (images folder) $newname="images/".$image_name; //we verify if the image has been uploaded, and print error instead $copied = copy($_FILES['image']['tmp_name'], $newname); if (!$copied) { echo '<h1>Copy unsuccessfull!</h1>'; $errors=1; }}}} //If no errors registred, print the success message if(isset($_POST['Submit']) && !$errors) { echo "<h1>File Uploaded Successfully! Try again!</h1>"; } ?> <!--next comes the form, you must set the enctype to "multipart/frm-data" and use an input type "file" --> <form name="newad" method="post" enctype="multipart/form-data" action=""> <table> <tr><td><input type="file" name="image"></td></tr> <tr><td><input name="Submit" type="submit" value="Upload image"></td></tr> </table> </form>
  4. Hey Chris, I like it. Simple yet effective. Good Job
  5. Bruno Leite replied to Bruno Leite's topic in Frontend
    Ok I have a new problem with this now... They won't align properly. Thanks in advance
  6. Bruno Leite replied to Bruno Leite's topic in Frontend
    Well, you sir are a genius ;P Thanks, I added a little filler box with the clear:both. Thanks for that
  7. Bruno Leite posted a topic in Frontend
    I have recently made a website but I am having some problems because I am trying to float some objects so that they can occupy a reasonable ammount of space. So I made it to be floated to the left, the only problem I have now is that when I do that, my content div, assumes as if there was nothing there. HTML: <?php do { ?> <div class="parceiros"> <a href="<?php echo $row_parceiros['link']; ?>" target="_blank"><?php echo $row_parceiros['name']; ?></a> <div class="imgparceiros"> <a href="<?php echo $row_parceiros['link']; ?>" target="_blank"><img style="border:0"src="<?php echo $row_parceiros['image']; ?>" /></a></div> </div> <?php } while ($row_parceiros = mysql_fetch_assoc($parceiros)); ?> CSS: .parceiros { font-family:Verdana; font-size:18px; letter-spacing:1px; padding-top:5px; width:250px; text-decoration:none; font-weight:100; text-align:center; float:left; } Example: Any help would be much appreciated
  8. Bruno Leite posted a topic in Server Side
    I recently made a website for a friend, and he wanted to put some dates on when the stuff was made. So I made some little boxes which you can scroll down to the date you made it, all quite simple, but now everytime he goes to edit, or basically do ANYTHING in the page to edit any information the option boxes reset to their initial value. Is there anyway I can see their initial value using the recordset? How can you set the inital value on the options in html? Thanks in advance for your help guys Much appreciated
  9. This is a good website mate, but I hope this topic won't die on you. Not enough views here so people can criticize.
  10. PHP

    Bruno Leite replied to Bruno Leite's topic in Server Side
    Elanman this is how I am seeing it
  11. PHP

    Bruno Leite replied to Bruno Leite's topic in Server Side
    Well thanks ElanMan, btw I enjoyed your post on the "digg effect" very entertaining, and thanks for your help, I do need someone's help on this matter I have a webpage I am building http://www.brunoseo.com/portfolio/dfblockphp/servicos.php If you view it on Mozilla Firefox, you can't see the BG image of DF block but in IE you can, and you get a extra DF bg image on it. Any help would be much appreciated, I was trying to find a way to incorporate the *<div class="h1">* in the database but im not sure if that would be the way to go anyway. Any advice would be great, thanks guys
  12. PHP

    Bruno Leite posted a topic in Server Side
    I wanted to be able to add a tag <div class="h1"> after I inputted this form, and i tried doing it like so... <?php $h1format = echo <div class="h1">; $formatted = nl2br ($row_servicos['content']); ?> then this in the <?php do { ?> <?php echo $h1format; ?></div> <?php } while ($row_servicos = mysql_fetch_assoc($servicos)); ?> If someone could give me a hand on this. Much appreciated
  13. He can also use sIFR
  14. I love your website, I think it is great, I have registered already, I love the design there is a small bug though. I tried to check my profile on there and I got this error. Warning: include(item_.php) [function.include]: failed to open stream: No such file or directory in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include(item_.php) [function.include]: failed to open stream: No such file or directory in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include() [function.include]: Failed opening 'item_.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include(item_.php) [function.include]: failed to open stream: No such file or directory in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include(item_.php) [function.include]: failed to open stream: No such file or directory in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include() [function.include]: Failed opening 'item_.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include(item_.php) [function.include]: failed to open stream: No such file or directory in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include(item_.php) [function.include]: failed to open stream: No such file or directory in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include() [function.include]: Failed opening 'item_.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include(item_.php) [function.include]: failed to open stream: No such file or directory in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include(item_.php) [function.include]: failed to open stream: No such file or directory in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include() [function.include]: Failed opening 'item_.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include(item_.php) [function.include]: failed to open stream: No such file or directory in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include(item_.php) [function.include]: failed to open stream: No such file or directory in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include() [function.include]: Failed opening 'item_.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include(item_.php) [function.include]: failed to open stream: No such file or directory in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include(item_.php) [function.include]: failed to open stream: No such file or directory in /home/gazzwi86/public_html/profiles/profile.php on line 126 Warning: include() [function.include]: Failed opening 'item_.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gazzwi86/public_html/profiles/profile.php on line 126 I do wish to be a integrant part of your website
  15. Could I possibly get some more replies on this? =) Thanks for your input EDIT: Char, I tried out pulling up the image so you could not have to scroll down, unfortunatelly, I don't think it looks as nice. I left it up in the index.html if you want to see or anyone else for that matter.
  16. Hi acuity, I grabbed 2 of those pictures, it was the savanah and the dandalion. Hope you don-t mind, I was hoping to maybe use them for any future webdesign that I may have, if you want I can destroy the photos obviously but anyway, they are great and excellent quality. Great post
  17. Hi char, thanks for your input. Well, I was also thinking that about the image, I could easily reduce the size, and I loved the fact that you said you hated scrolling down to read the text, that was just the sort of input I like to hear. I will put a larger gap between the navigation and the first paragrah, I am extremelly interested in usability as well. About the green arrow, why would you remove it? Hmmm I must say I do like it, but I would like some input on it. The portfolio link will be removed actually. My other webpage, BMLDesigns.com will be where I have my portfolio work. About the contact page yes I do feel this is my weakest point to be honest, it was styled in CSS, but if you have any advice on how to improve it I would very much appreciate it. Once again, thanks for your time.
  18. My website is a Search Engine Optimisation Experiment, I have no gains with it at all, it is a way for me to get some feedback on the design bit of it, and the actual journal writing. Any feedback would be much appreciated. Thank you all for your time. http://www.brunoseo.com
  19. Yep, I managed to do it already, although a bit differently but managed. Thanks guys. Thanks for your help guys
  20. Hi MrBrightside, thanks, I understood it, like I said, I did research it, and it would be easier to implement like you said. Inserting nl2br but what I am having problem with is implementing it. <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $currentPage = $_SERVER["PHP_SELF"]; $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } nl2br($editFormAction); - ------------------------------------------------------------------------This is where I put it. :x if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO servicos (id, title, content) VALUES (%s, %s, %s)", GetSQLValueString($_POST['id'], "int"), GetSQLValueString($_POST['title'], "text"), GetSQLValueString($_POST['content'], "text")); mysql_select_db($database_dfblock, $dfblock); $Result1 = mysql_query($insertSQL, $dfblock) or die(mysql_error()); $insertGoTo = "adminservicos.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } mysql_select_db($database_dfblock, $dfblock); $query_servicos = "SELECT * FROM servicos"; $servicos = mysql_query($query_servicos, $dfblock) or die(mysql_error()); $row_servicos = mysql_fetch_assoc($servicos); $totalRows_servicos = mysql_num_rows($servicos); $maxRows_editservicos = 10; $pageNum_editservicos = 0; if (isset($_GET['pageNum_editservicos'])) { $pageNum_editservicos = $_GET['pageNum_editservicos']; } $startRow_editservicos = $pageNum_editservicos * $maxRows_editservicos; mysql_select_db($database_dfblock, $dfblock); $query_editservicos = "SELECT * FROM servicos"; $query_limit_editservicos = sprintf("%s LIMIT %d, %d", $query_editservicos, $startRow_editservicos, $maxRows_editservicos); $editservicos = mysql_query($query_limit_editservicos, $dfblock) or die(mysql_error()); $row_editservicos = mysql_fetch_assoc($editservicos); if (isset($_GET['totalRows_editservicos'])) { $totalRows_editservicos = $_GET['totalRows_editservicos']; } else { $all_editservicos = mysql_query($query_editservicos); $totalRows_editservicos = mysql_num_rows($all_editservicos); } $totalPages_editservicos = ceil($totalRows_editservicos/$maxRows_editservicos)-1; $queryString_editservicos = ""; if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); $newParams = array(); foreach ($params as $param) { if (stristr($param, "pageNum_editservicos") == false && stristr($param, "totalRows_editservicos") == false) { array_push($newParams, $param); } } if (count($newParams) != 0) { $queryString_editservicos = "&" . htmlentities(implode("&", $newParams)); } } $queryString_editservicos = sprintf("&totalRows_editservicos=%d%s", $totalRows_editservicos, $queryString_editservicos); ?> <?php do { ?> <div class="h1"><?php echo $row_servicos['title']; ?></div> <div class="h2"><?php echo $row_servicos['content']; ?></div> <?php } while ($row_servicos = mysql_fetch_assoc($servicos)); ?> <br /><br /><br /> <form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1"> <div class="h2">Título:<br /></div> <div class="h2"><input type="text" name="title" value="" size="32" /><br /><br /></div> <div class="h2">Contéudo:<br /></div> <div class="h2"> <textarea name="content" cols="40" rows="20"></textarea> </div> <div class="h2"> <input type="submit" value="Inserir" /></div> <input type="hidden" name="MM_insert" value="form1" /> </form> <p> </p> </table> <table border="0" align="center"> <?php do { ?> <tr> <td><div class="h4"><a href="servicosedit.php?recordID=<?php echo $row_editservicos['id']; ?>"><?php echo $row_editservicos['title']; ?></a></div> </td> <td><div class="h4"><a href="deleteServicos.php?recordID=<?php echo $row_editservicos['id']; ?>">Apagar</a></div></td> </tr> <?php } while ($row_editservicos = mysql_fetch_assoc($editservicos)); ?>
  21. Hmmm thanks for the reply there MrBrightside, and really, pardon my ignorance, but how would I implement that? $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } nl2br($editFormAction); if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO servicos (id, title, content) VALUES (%s, %s, %s)", GetSQLValueString($_POST['id'], "int"), GetSQLValueString($_POST['title'], "text"), GetSQLValueString($_POST['content'], "text")); mysql_select_db($database_dfblock, $dfblock); Ok OK I know I am dumb lol but I can't figure it out, yes I have researchehd it, and everybody says function nl2br which is great, cause it is the command for it, but I can't get it to work.
  22. Bruno Leite posted a topic in Server Side
    I made a website for someone, and they don't know how to use html so everytime they make a post and try to insert a line break or even a list item, well you all know what it does. It converts it to pure html. Is there anyway I could make a line break. I have no clue on how to do it. Basically what I want, is he is typing something in, he hits enter, next line, and when he posts it, that enter will be displayed as a line break. If someone could give me a hand on this I would be very much appreciated. Thanks in advance guys.
  23. PHP

    Bruno Leite replied to Bruno Leite's topic in Server Side
    Well, the admin in it part is actually the user name that I am inputting. If I input another username just replace that with whatever you put in the user name bar. Edit: Ok guys, well problem solved... I was searching some more errors, and well, the fact is in my database I had id user pass and apparently user is a reserved name for the code, so it was confusing it. Sooooooo I changed it to username, and it worked no problem. Thanks for the help guys
  24. PHP

    Bruno Leite replied to Bruno Leite's topic in Server Side
    No, not at all. I am using dreamweaver, and it has never given me this before.

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.