简体   繁体   中英

Page refreshes when I click Register

I am working on an RPG game, I'm almost done, but this problem occurs. For some reason when I click 'Register' page refreshes..? I copied this register code by the way, so that could be the problem?

<input type='hidden' name='referer' value=''>
<input type="submit" name="submit" value="Register" class="button"/>

This is the code, please suggest.

Your second input type is submit, which makes the form submit all entered data into the specified "action" page. If you are interested in reading more look here . By default, the action page just submits to the current page (I think). So it seems to just reload.

Also, your code is invalid, the proper syntax would have brackets <> around the inputs; like this and "hidden" is not a valid type

<input type='hidden' name='referer' value=''> 
<input type="submit" name="submit" value="Register" class="button"/>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM