scriptygoddess

Archive for the ‘Lessons learned’ Category

30 Sep, 2004

PHP: Hiding Errors

Posted by: Jennifer In: Lessons learned

I was running into a problem with undefined index errors. You'll get that if you do seomthing like:
echo $_GET['name'];
when there is no $_GET['name']. One option is to check to make sure $_GET['name'] is set like
if (isset($_GET['name'])) {
echo $_GET['name'];
}
But if you're feeling lazy, you can leave your code as is and just add this at [...]

21 Sep, 2004

PHP: Remove an element from an array

Posted by: Jennifer In: Lessons learned

Found on this thread
I needed to remove elements from an array that were either blank, nothing but a space, or null.
foreach($array as $key => $value) {
if($value == "" || $value == " " || is_null($value)) {
unset($array[$key]);
}
}
/*
and if you want to create a new array with the keys [...]

02 Sep, 2004

Code for IE's eyes only

Posted by: Jennifer In: Lessons learned

While we're on the subject of IE funkiness – I ended up on Toothpaste Addict tonight and noticed this little trick. (Actually, something weird happend when I copied and pasted the code from Toothpaste. Must have something to do with the text formatting there. But I found this page – which actually shows the same [...]

02 Sep, 2004

One form – two actions

Posted by: Jennifer In: Lessons learned

It's a good thing I have no shame in admitting when I was doing something stupid. Otherwise I'd have no posts for this category.
Just to explain a little about what I was working with – it was essentially an email form (emailform.php) – but before sending the email, it brought you to a [...]

I'm in the process of moving a few other blogs over to use WP – one of which makes calls to a seperate database unrelated to WP. This proved to cause a conflict. After many hours of trying to figure out where the specific conflict was – I narrowed it down to my mysql_select_db line. [...]

06 May, 2004

Drinking the CSS Koolaid

Posted by: Jennifer In: Lessons learned

For the past few weeks, I've been using CSS for my layouts (at work) and I can say that I think I've officially been converted. While I still struggle with the little nuances (see previous post) – it IS starting to make sense to me.
I'm now about to start using CSS in a more involved [...]

04 May, 2004

CSS: quirk in Firefox with backgrounds?

Posted by: Jennifer In: Lessons learned

Not sure this is the right category for this – as I STILL don't understand WHY. I should probably add a special category for my CSS issues and name it "Dazed and very very confused"
I wanted the background of the page one color – and I wanted the area behind a sidebar and a main [...]

22 Apr, 2004

CSS: Mac IE issues

Posted by: Jennifer In: Lessons learned

I'm not sure that "Lessons Learned" is the most appropriate category for this, as all I've really learned from this little exercise is that IE on the Mac SUCKS.
1) When testing changes to a stylesheet on the Mac – I can't just hit refresh and have it load in the new/revised stylesheet. I have to [...]

08 Apr, 2004

CSS: Shortcuts

Posted by: Jennifer In: Lessons learned

(Still on old news for you CSS-pros. I'm wondering why YOU'RE not writing this blog. All the comments have been more helpful than my posts!! LOL!)
Just wanted to jot these down so I could find them later:
font-weight: bold;
font-size: 10px;
font-family: Verdana,Arial,Helvetica,sans-serif;
shortcut:
font: bold 10px Verdana,Arial,Helvetica,sans-serif;
margin/padding shortcuts:
margin: top# right# bottom# left#
ie. margin: 5px 0px 2px 10px;
or
margin: top&bottom# left&right#
ie. [...]

07 Apr, 2004

CSS – Paste now, Understand later

Posted by: Jennifer In: Lessons learned

So I'm moving along in my CSS understanding. I (think) I get float, positioning. I even get the box model, and box model hack.
I had a small site that used a tabled-design that is due to go live next week, so I decided I'd quickly convert it to CSS before the launch. (Yes, I know [...]


Featured Sponsors


  • Michael: You can use get_header(2) in your case. The filename of your custom header has to be header-2.php. The problem with include(your_file.php) is, all
  • cliff: hi wonder if you can help me, pls i designed www.kouga.mobi using dreamweaver CS3 and now want to make the phonenumbers into links so that if you
  • jerey: how do i rewrite this because it tried RewriteEngine on #Options +FollowSymlinks RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FIL

About


Advertisements