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.

gold killer

Members
  • Joined

  • Last visited

Everything posted by gold killer

  1. The page is a bit too quirky for me. The links with backgrounds are overdone as well as the circles (mainly looking at the about page). Based on your work in your portfolio I think you could do better. I read somewhere earlier this week that your portfolio is 50% of your portfolio which does make a lot of sense. I think you just need to tone down some of the things you've done and make it your best work possible. Nice try though.
  2. The problem with animation is that it will be the first thing people look at so unless it's something important it's not worth doing. Thinking of all the websites people like to visit - google, facebook, digg etc... none of them have animation, I'm not saying don't think outside the box but animation isn't the best idea.
  3. The image is a background image like mentioned above. If you're using chrome try right clicking and choosing inspect element, it puts the site css in a very easy to read format so you can see how everything is being done. As for splash pages, they're very outdated as people started to realise the conversion rate drops as soon as you put a splash page up. Imagine you find a site through Google, you're not going to click around 1 specific site looking for what you want, if it's not right in-front of you then you'll go to the next result.
  4. If you don't mind using HTML5 then you could use <audio>
  5. If you have the desire to actually learn rather than using other peoples code then start looking at PHP or Ruby tutorials. PHP is more widely used but Ruby is becoming so more and more so it's really down to your preference as to what you go with. The way I started with learning PHP is by copy and pasting tutorials and just editing the code to how I wanted. Then when I broke it I would have to work out what I did wrong and I went from there.
  6. In this tutorial you will learn how to make a new page using php, this is great for cms's as users can add a new page online and edit it online. A tutorial on how to edit online is found here first of all we need to create a simple xhtml form, like so: <form method="post" action="<?=$PHP_SELF?>"> Page name: <input name="page_name" size="27" /> <select name="page_extension"> <option value=".php">.php</option> </select> <br /><input type="submit" name="add_new_page" value="Add Page" /> </form> This is pretty simple so far. Line 1: starts the form and defines what it does Line 2: An input field for the name Line 3: Starts a drop down menu Line 4: Option 1 for the drop down menu Line 5: End the drop down menu Line 6: A submit button for the form Line 7: End the form Now we have a form we need to make it so it submits to something! <?php if($_POST['add_new_page']){//If the form has been submit $page_name = strip_tags($_POST['page_name']);//Post the page name, remove all html from it $page_extention = strip_tags($_POST['page_extension']);//Post the page extension, remove all html from it $filename = "files/".$page_name."".$page_extension."";//The location to send the new file $handle = fopen($filename, "x")or die("<strong>Cannot create file!</strong><br />");//Create the new file chmod("$filename","0777");//CHMOD the file to 0777 so it can be edited using the system! if (fwrite($handle, "Content goes here") === FALSE) {//If it cant write to the file print "Cannot write to file (".$filename.")";//Error msg exit;//Exit the script } print "Created file ".$page_name.", it is located ".$filename."<br />";//Success message fclose($handle);//Close the handle! print "Please wait 3 seconds to be redirected!<meta http-equiv=\"refresh\" content=\"3\">";//Done! }//End if ?> Now for this to work you just need to CHMOD the folder specified in $filename, in my example its called "files" CHMOD this to 0777 and your good to go! -gold :thumbsup:
  7. Recently I have been reading posts where people have been saying one thing is better or worse than another so i thought id do this tutorial to clarify these things and also teach you some little tricks in the process... Echo, Print, die and Return These are all similar in the fact that they display text if entered into them. That can be done like so: echo 'text'; print 'text'; return 'text'; die 'text'; So what do these all do? Echo is very similar to print with the way it acts but the only difference is that it returns text and a value of NULL / FALSE. eg1 <?php function Test() { echo 'This is a test'; } $tryTest = Test(); //Define a variable to a function if( $tryTest )//If there is something in the variable { echo '(Y)';//Show a done message } else//If not { echo '(N)';//Show a not done message } ?> For this example you would be shown (N) as echo has displayed the text but hasnt told the script that is has done so, therefore thinking nothing has been shown. Print on the other hand does return TRUE so if we replace all our echo's with print we would get (Y). eg2 <?php function Test() { print 'This is a test'; } $tryTest = Test(); //Define a variable to a function if( $tryTest )//If there is something in the variable { print '(Y)';//Show a done message } else//If not { print '(N)';//Show a not done message } ?> Now we have gone through the difference between print and echo we are left with return and die... Return is used mainly in functions when you want to send text but not display it yet. Return also means that the script stops because it is used when you have gotten to the end of an algarithm... eg3 <?php function Test()//A new function called test { $q = b; if( 'y' == 'n' ) { return 'Done'; } elseif( 't' != $q ) { return 'Done'; } else { return FALSE; } }//End function if( Test() ) { print 'This won\'t be shown as the function Test has returned a negative value '; } ?> Now you maybe wondering what return FALSE is doing... With return you can return a value without any text involved, so return FALSE; ends the script but it doesnt return a value so if assigned to a variable it wouldnt work; as shown in the above example. Die must be the most dramatic of all php predefined functions all it basically does is end the script and return a negative value. It is used like so: eg4 die('Test'); or just die 'Test'; Quotation marks Now we can move onto the difference between quotation marks and dashes. When using php with MySQL you may see 3 different marks like so: ` ' " The first one ` is used in MySQL to wrap arround table names and field names (it is found on the top left of your keyboard). It is used like so: SELECT `id`, `name`, `delete` FROM `tablename`; The above statement would work but in MySQL this would not work SELECT 'id', 'name', 'delete' FROM 'tablename'; The above would not work as it is telling MySQL that the values are strings relating to field such as `name` = 'frank'; In PHP the single quotation mark ' is used to display text and only text. eg5 <?php print 'This is text'; //This would simply show: //This is text $fruit = 'apples' print 'I love my $fruit'; //This would show: //I love my $fruit //The variable is treated as text so is not replaced by the string assigned to it //To make the variable work you can do 2 things... print 'I love my ' . $fruit; //This would show: //I love my apples //The above print function ends the text string by adding the second single quotation //But the print function is not finished untill you add; so you can add a . and the variable will be added after the string infront of it. ?> Another way to display the variable is to use double quotations, this treats everything as a variable so takes abit longer to render the text (it still works but just abit slower). You can use the double quotations like so... eg6 <?php $fruit = 'oranges'; print "I love to eat $fruit all the time"; //This will display //I love to eat oranges all the time //A bad thing with this is that $fruit won't be highlighted in the variable colour so it will be harder on the eye to spot in long lines of code so you can do print "I love to eat ".$fruit." all the time"; //This will display //I love to eat oranges all the time ?> You maybe wondering what happens when you need to use that quotation mark inside itself, this is done like so: eg7 print "gold killer said: \"Hi\" "; //This would display - gold killer said: "Hi" print 'gold killer said: \"Hi\" '; //This would display - gold killer said: \"Hi\" - This is because the double quotations can be used normaly inside single quotations and visa versa, like so: print "gold killer said: 'Hi' "; //This would display - gold killer said: 'Hi' print 'gold killer said: 'Hi'; //This would not work as the single quotations need a \ infront of them like so: print 'gold killer said: \'Hi\'\; //This would work and would display - gold killer said: 'Hi' Now you could be thinking thats going to be a pain when displaying big chunks of xhtml, PHP 5 has a simple sollution like below: eg8 <?php echo<<<END <form method="post" action="test.php"> Forename: <input type="text" name="fname" /><br /> Surname: <input type='text' name='sname' /><br /> <input type="submit" value='GO!' /> </form> END; ?> Thats the simple and easiest way of displaying big chunks of html in PHP 5. In PHP 4 you can do that like so: eg9 <?php //PHP here ?> <form method="post" action="test.php"> Forename: <input type="text" name="fname" /><br /> Surname: <input type='text' name='sname' /><br /> <input type="submit" value='GO!' /> </form> <?php //PHP here ?> But one problem with that is that you can't display PHP variables... You may think about starting it all up again and doing <?php echo $var; ?> You maybe thinking, surley php would not be this dumb... its not! Below is the quick echo: eg10 <?php $var = 'GO!';//Define our variable ?> <form method="post" action="test.php"> Forename: <input type="text" name="fname" /><br /> Surname: <input type='text' name='sname' /><br /> <input type="submit" value="<?=$var?>" /> </form> <?php ?> So to do a quick echo all you need is <?=$variableName?> or <?=$variableName;?> \t \s \n These are used as breaks in the code as php does not automatically add line breaks in your code when using echo or print so to do this you can use \n This means when you view source there will be a new line started there! \t Is a tab value so when added the source gets tabbed accross \s this is the same as in html! Below is all of these brought together: eg11 <?php print ' \t<table>\n \t \t<tr>\n \t \t \t<td>\s</td>\n \t \t</tr>\n \t</table>\n '; ?> This would display: <table> <tr> <td> </td> </tr> </table> Thanks for reading, if you need any help just post
  8. Computer says no... Hi cyruswu
  9. Its not ajax, just Mootools javascript animation. Its pretty easy to do
  10. Basically agreeing with the last 2 posts
  11. Sorry but thats not web 2.0, its just a photoshop template. Im not really a big fan of them either, both are tooo monotone
  12. Hi, my favourite past times include Habbo and looking for a php user system tutorial that i can copy and paste onto my site with lots of addons.

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.