1
blyfoten
wierd code?
  • 2004/11/1 8:35

  • blyfoten

  • Just popping in

  • Posts: 3

  • Since: 2004/10/29


in register.php i find this code on line 118 and 122, a switch() statement on an variable that's set just a couple of rows earlier??
le="color: #000000"><?php $op = 'register'; //row 118 foreach ( $_POST as $k => $v ) { $$k = $v; } switch ( $op ) { //row 122 case 'newuser': . . /*helluvalot of code thats never going to be executed?!*/ . . case 'finish': . . /* even more useless code */ . . /* and finaly */ case 'register': default: include 'header.php'; //OpenTable(); include 'include/registerform.php'; $reg_form->display(); //CloseTable(); include 'footer.php'; break; }


2
Jan304
Re: wierd code?
  • 2004/11/1 12:57

  • Jan304

  • Official Support Member

  • Posts: 520

  • Since: 2002/3/31


The register.php file is just fine...

Before the switch there is a function defined (userCheck to be exactly), and a function is only executed after being called...

So nothing to panic, file is just fine, and no overkill code.

// Edit: I see you mean the switch won't work. Well, it will. Check the loop after the hard definement. This well set eventually back the $op var.

3
smdcom
Re:wierd code?

duplicate post.. ackbarr also give his reponse..

Here

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits