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.

php_penguin

Privileged
  • Joined

  • Last visited

Everything posted by php_penguin

  1. php_penguin replied to ElanMan's topic in General Chat
    fancy idea, but when it comes to searching for something quickly, text is faster, both in loading and interpreting the results.
  2. pound coins neeeeed to be a different color - that is how I spot them in my "bag of change" (a bag which I put all my change in, curently weighs around 3kg) The actual design is ok, but it looks too odd to be the "new currency" rather than just a special run sort of thing...
  3. php_penguin replied to headcoat's topic in General Chat
    what is the difference between a headcoat and a hat, exactly?
  4. Php

    php_penguin replied to scaz182's topic in Server Side
    this happens to me with Firefox, usually after long periods of use (>4 hours for me). It is nothing to do with your PHP - try using Firefox 3
  5. hi, firstly, please explain what your idea is secondly, "really good" and "i'd pay for it" are not the same thing. Google Checkout and so on may provide a similar service for free.
  6. oh yes, and MySQL can do it - I can't remember how though, so Google "importing data from a text file into MySQL"
  7. ah, i was wrong CSV = comma seperated I was thinking of "DSV" or delimiter seperated, usually just stored as .txt http://en.wikipedia.org/wiki/Delimiter-separated_values http://en.wikipedia.org/wiki/Comma-separated_values
  8. <?php // mysql connect, and select database $file = file("data.txt"); $keys = explode("|", $line[0] ); foreach( $keys as $i=>$key ) { $keys[$i] = "`".trim($key)."`"; } unset( $line[0] ); $query = "INSERT INTO `datatable` (".implode(",",$keys).") VALUES "; $dataSet = array(); foreach( $file as $line ) { $data = explode("|", $line); foreach( $data as $i=>$d ) { $data[$i] = "'".trim($d)."'"; } $dataSet[] = "(".implode(",",$data).")"; } $query .= implode( ",", $dataSet ); mysql_query( $query ) or die( "Error<br>$query</br></br>".mysql_error() ); ?> Also, I'm pretty sure "csv" means "character seperated values" rather than "comma seperated values"...
  9. wow that is soo cool - I couldn't find headphones so I just put my speakers either side of my head ... only trouble is my "left" speaker is on the right, and vice versa... I hate electric shears too so that was a bit stressful
  10. Is it just me or this song slightly different to the version on the Cross album? Maybe it is just sounds related to the animations... Great video though The one for D.A.N.C.E was great too.
  11. I'm guessing you didnt take too much of a look then Splashtech - it is entirely possible to organise your CI structure exactly as you want to - including renaming the index file, using a different URL structure, moving any of the system > * directories to anywhere else ... however you want to organise it, it is possible to organise it like so.
  12. 1. open up photoshop or your favourite drawing program (GIMP is free). 2. create a canvas which is 1000x1 (yes, height = 1px) 3. select your colour palette 4. select the gradient tool 5. click at on end of the canvas 6. click at the other end of the canvas 7. save as PNG, + GIF, + JPEG - the file size here is a bit of an unknown, so compare them and choose the best trade-off between size and qaulity. Ok, so that is the image created, now to make it work in our HTML+CSS. Assuming your image is located in the same directory as your CSS, and it is called "bg_grad.png" (just guessing here), add this to your CSS: #COLOR must be the right-hand colour of the gradient body { background: #COLOR url(bg_grad.png) repeat-y; }
  13. php_penguin posted a topic in Server Side
    Right, I am forgetting all my PHP knowledge ... and learning PHP-CI This is a lightweight framework that works in a nice MVC way - if you are used to classes (oop) then check out the video tutorials ... it convinced me... and I then built an FAQ system in about 15 minutes (+15 minutes styling) - i'll put it online in a bit. Anyway: CodeIgniter
  14. The BBC news stories have updated design-wise, so they fit the updated BBC design properly now. Interestingly, the beeb has gone for 1024x768 as the minimum.. if they are doing it I might have to follow suit.
  15. Alchohol : Foster's - I really can't handle spirits, one drink and I am throwing up... Soft Drink: Strawberr Frijj (milkshake) - I used to mainline Coca-Cola but it has started giving me really bad stomach pains lately.
  16. yay completed it I used PHP to solve the fibonacci one function fib($n){ if ($n < 2) return $n; else return fib($n - 1) + fib($n - 2); }
  17. ah lol thanks now stuck on 15
  18. grr stuck on the 10 of spades one...
  19. you may not have the PHP->MySQL library installed, it needs to be installed specifically (it is an Apache Module i think).
  20. do you know the MySQL username/password? If not, it's probably "root/root" or "root/", so try these two bits of code: <?php print mysql_connect( "localhost", "root", "root" ) or die( mysql_error() ); ?> <?php print mysql_connect( "localhost", "root", "" ) or die( mysql_error() ); ?> one of these will result in "1" being printed. This function also connects you to the MySQL server on your computer (assuming you have the MySQL Server 5.0 installed - you might have MySQL Client by accident - if so, it will say "can't connect on port 1234 or similiar). once you have connected you can then do all the usual SQL queries with mysql_query.
  21. you need to character encode your things, £ becomes £ - UTF-8 doesn't handle these great... then again the & symbol seems to screw up some XML parsers, so this might make it worse
  22. Seven words? I got ten (I am glad to tell you that you have passed) Congrats!
  23. Hi Daniel - I was asking exactly these questions a year ago until I just bit the bullet and started forcing myself to write in classes. The main difference between is a class and normal function is that a class has memory for each of it's instances. Secondly, compartmentalisation helps here (meaning everything is tied together as part of the class namespace, eg ClassName::MethodName()) Classes, from my experience, are just plain better for everything apart from the tiny stuff (eg helper functions which clean a string) ... once you have written the class, and if you write it well, everything will just fall into place. Here is an example of getting the results from two tables, and setting a value from one row into another row from the other table: Serialised (just functions) : // imagine we have a function called dbget( String table ); $table1 = dbget( 'firstTable' ); $table2 = dbget( 'secondTable' ); $row1 = $table1[ '42' ][ 'afield' ]; // swapping this $row2 = $table2[ '17' ][ 'anotherfield' ]; // with this, and vice versa // and a dbwrite( String table, Array where, Array data ) function $write = dbwrite( 'firstTable', array( "id"=>42 ), array( "afield"=>$row2 ) ); $write2= dbwrite( 'secondTable', array( "id"=>17 ), array( "anotherfield"=>$row1 ) ); Because there are some nice helper functions I have imagined there, it took 6 lines of code. Now with a class (using this class) $table1 = new DBEntity( 'table1', 42 ); $table2 = new DBEntity( 'table2', 17 ); $hold = $table1->afield; $table1->afield = $table2->anotherfield; $table2->anotherfield = $hold; $table1->Save(); $table2->Save(); Now it is 7 lines of code - but look how much simpler it is? I have only written the table names once, the words involved are simpler (IMO ->save() is easier than dbwrite( table, where, data )) Finally - don't study classes you boring oaf! Write some of your own! You will quickly learn what works, what went wrong, and without too much luck you won't fall into a pit of despair
  24. my homepage is iGoogle and it hasn't affected that... Anyway I thought Earth Hour was 8 pm-9pm?
  25. if you don't want to use Javascript, you could try with the (fragile) :active psuedo-class. HTML: <a class="peek-a-boo" href='#'> A Link <div>some hidden text</div></a> CSS: a.peek-a-boo * { display: none; } a.peek-a-boo:active * { display: auto; }

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.