0
<form action="<?php if($count==3) 
                        echo"populate3.php"; 
                    else
                        echo"populate1.php"; ?>" method="get" id="form1">

这样写正确吗?有什么替代方案?

4

1 回答 1

2
<?php
$action="":
 if($count==3) 
 {
 $action="populate3.php";      
 }
else
{
 $action="populate1.php"; 
}

echo ("<form action=\"$action\" method=\"get\" id=\"form1\">");
于 2013-07-10T11:16:11.543 回答