Jump to content

make.kz

Neophyte
  • Posts

    1
  • Joined

  • Last visited

make.kz's Achievements

Explorer

Explorer (1/14)

0

Reputation

  1. Ребята срочно нужна Ваша помощь, так как мой мозг уже отказывается думать. Делаю пошаговую регистрацию на смарти. Итак signup.tpl {include file='header.tpl'} <div id="container"> <table cellpadding="0" cellspacing="0" width="1000" align="center"> <tr> <td> {if !$signup_free} {else} {if $step==1} {if $is_error != 0} <table cellpadding='0' cellspacing='0' align="center"> <tr><td class='result'> <div class='error'><strong style="color:red;">{lang_print id=$is_error}</strong></div> </td></tr></table> <br> {/if} <form action="signup.php?signup_free=1" method="post"> <input type='hidden' name='next_step' value='{$next_step}'> <input type='hidden' name='step' value='{$step}'> <table cellpadding="0" cellspacing="0" align="center"> <tr> <td align="left"> <p>{lang_print id=1}</p> </td> <td> <p><input type="text" name="username" value="{$username}"/></p> </td> </tr> <tr> <td align="left"> <p>{lang_print id=4}</p> </td> <td> <p><input type="text" name="user_email" value="{$user_email}"/></p> </td> </tr> <tr> <td align="left"> <p>{lang_print id=5}</p> </td> <td> <p><input type="password" name="user_password" value="{$user_password}"/></p> </td> </tr> <tr> <td align="left"> <p>{lang_print id=6}</p> </td> <td> <p><input type="password" name="user_password2" value="{$user_password2}"/></p> </td> </tr> <tr> <td align="left"> <p>{lang_print id=9}</p> </td> <td> <p><select name="reg_type"> <option value="0">{lang_print id=9}</option> {section name=items_loop loop=$items} <option value="{$items[items_loop].id}" {if $items[items_loop].id==$reg_type}selected='selected'{/if}>{lang_print id=$items[items_loop].name}</option> {/section} </select></p> </td> </tr> <tr> <td colspan="2"> <input type="checkbox" value="1" name="signup_agree"> <label> {lang_print id=13} </label> </td> </tr> <tr> <td colspan="2"> <p><input type="submit" value="{lang_print id=7}" /></p> </td> </tr> </table> </form> {elseif $step==2} {if $is_error != 0} <table cellpadding='0' cellspacing='0' align="center"> <tr><td class='result'> <div class='error'><strong style="color:red;">{lang_print id=$is_error}</strong></div> </td></tr></table> <br> {/if} <form action="signup.php?signup_free=1" method="post"> <input type='hidden' name='next_step' value='{$next_step}'> <input type='hidden' name='step' value='{$step}'> <table cellpadding="0" cellspacing="0" align="center"> <tr> <td align="left"> </td> <td> Step2 </td> </tr> <td colspan="2"> <p><input type="submit" value="{lang_print id=7}" /></p> </td> </tr> </table> </form> {elseif $step==3} {if $is_error != 0} <table cellpadding='0' cellspacing='0' align="center"> <tr><td class='result'> <div class='error'><strong style="color:red;">{lang_print id=$is_error}</strong></div> </td></tr></table> <br> {/if} <form action="signup.php?signup_free=1" method="post"> <input type='hidden' name='next_step' value='{$next_step}'> <input type='hidden' name='step' value='{$step}'> <table cellpadding="0" cellspacing="0" align="center"> <tr> <td align="left"> </td> <td> Step3 </td> </tr> <td colspan="2"> <p><input type="submit" value="{lang_print id=7}" /></p> </td> </tr> </table> </form> {/if} {/if} </td> </tr> </table> </div> {include file='footer.tpl'} signup.php if($step == 1) { $step = 1; $next_step = 2; $entity = mysql_query("SELECT * FROM reg_types"); while($e=mysql_fetch_assoc($entity)){ $items[] = array('id'=>$e['id'], 'name'=>$e['type_name']); } $smarty->assign('items', $items); if($signup_agree != 1) { $is_error = 12; } if(ereg('[^A-Za-z0-9]', $username)) { $is_error = 14; } if($user_password != $user_password2) { $is_error = 15; } if (!preg_match("/[0-9a-z_]+@[0-9a-z_^\.]+\.[a-z]{2,3}/i", $user_email)){ $is_error = 16; } if($reg_type<0){ $is_error = 17; } if($is_error==0){ $step=2; }else{ $step=1; } } Ну так вот, у меня не переходит на $step=2; Это часть кода из php-файла. Просто именно тут ошибка. Хотя никакую ошибку не выдает, все работает, и $_POST[step] выводил, показывает 2, но не переходит на него
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy