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??
$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

Who's Online

173 user(s) are online (76 user(s) are browsing Support Forums)


Members: 0


Guests: 173


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits