News for hackers. Stuff that matters.
Re:Take the Arc Challenge by tig on Sunday February 03, 2008 @06:35AM (#108625)
PHP:

  if ($S['foo']) echo "you said {$S['foo']}";
  elseif (PtoS('foo')) link('said','click here');
  else form('foo');
For me, making programs short is not a design goal. But if it would, I would do it like above. My framework then would include this functionality:

  S[] contains all session variables
  P[] contains all posted variables
  PtoS copies an entry from P to S. Returns false if P was not set.
  link() prints a link
  form() shows a form with the given fields. target is the current url.

There are no comments on this comment yet.