Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
noonches
Dec 5, 2005

It represents my lifestyle and stratus as a street savy irreverent youth, who lives large, and yet hungers for the next level in life.
code:
<select ="prefix">
    <option value="<?=$_SESSION['prefix']?>"><?=$_SESSION['prefix']?></option>
    <option value="mr">mr</option>
    <option value="mrs">mrs</option>
    <option value="ms">ms</option>
    <option value="dr">dr</option>
</select>
So I guess rather than just adding "selected" with like a tiny piece of code, it's trying to add the option you had previously selected to the top so it defaults to the selected one.

It's not that bad, it's just irritatingly lazy.

Adbot
ADBOT LOVES YOU

noonches
Dec 5, 2005

It represents my lifestyle and stratus as a street savy irreverent youth, who lives large, and yet hungers for the next level in life.
<?=($_SESSION['prefix']=="")?"selected":""?>

One of those per line is not that much, esp since it's a cut and paste job and avoids a nasty dupliacte.

noonches
Dec 5, 2005

It represents my lifestyle and stratus as a street savy irreverent youth, who lives large, and yet hungers for the next level in life.

Scaevolus posted:

On principle, using eval is always wrong.

In practice, it usually is too.

noonches
Dec 5, 2005

It represents my lifestyle and stratus as a street savy irreverent youth, who lives large, and yet hungers for the next level in life.
I'm guessing this was generated by dreamweaver, or I hope it was, at least. If someone wrote this, they should be shot, regardless of if it works.

code:
<select name="TshirtSize"<option>-Size-
<option>SS<option>S<option>M<option>L<option>XL<option>XXL
</select>
It's not so bad, in itself, but I just inherited a form with about 30 of these for various options, and debating if it really annoys me enough to try to fix them all.

noonches
Dec 5, 2005

It represents my lifestyle and stratus as a street savy irreverent youth, who lives large, and yet hungers for the next level in life.

Dazzling Double V posted:

A classmate tragically misunderstands how HTML works. He even tried to match the syntax coloring from the tutorial he was using. This was the culmination of his efforts before giving up and switching to iWeb.

Wait, is that what his code looks like, or did he use some composer to create a page to display the code like that?

Adbot
ADBOT LOVES YOU

noonches
Dec 5, 2005

It represents my lifestyle and stratus as a street savy irreverent youth, who lives large, and yet hungers for the next level in life.
Which part is a horror, the logging in from just setting a GET var, or the passing of a filename in the query string? They're both pretty awful.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply