Jump to content

[SOLVED] Hmm, form submissions redirecting to homepage.


Ninjakreborn

Recommended Posts

This is a little strange.

One site I am working on, I am finding out that right now that I am in testing phase, every form (sometimes) I try to submit it does nothing but sends them back to the homepage.

You go to the form, fill it out, submit, and it sends them back to the homepage like nothing ever happened.

I can show code, but it's happening on all forms, and I did nothing different that I never did before (and there are no "header" redirects, or html redirects, or javascript redirects anywhere.

Any advice on what could cause this.

Link to comment
Share on other sites

<form name="editaccount" id="editaccount" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<table>
<tr>
<td><label for="firstname">First Name:</label></td>
<td><input name="firstname" id="firstname" type="text" maxlength="150" 
value="<?php echo stripslashes($row['firstname']); ?>" /></td>
</tr>
<tr>
<td><label for="lastname">Last Name:</label></td>
<td><input name="lastname" id="lastname" type="text" maxlength="150" 
value="<?php echo stripslashes($row['lastname']); ?>" /></td>
</tr>
<tr>
<td><label for="email">*Email:</label></td>
<td><input name="email" id="email" type="text" maxlength="150" 
value="<?php echo stripslashes($row['email']); ?>" /></td>
</tr>
<tr>
<td><label for="password">*Password:</label></td>
<td><input name="password" id="password" type="password" maxlength="150" /></td>
</tr>
<tr>
<td><label for="verifypassword">*Verify Password:</label></td>
<td><input name="verifypassword" id="verifypassword" type="password" maxlength="150" /></td>
</tr>
<tr>
<td colspan="2"><label for="abilities">Abilities:</label></td>
</tr>
<tr>
<td colspan="2"><textarea name="abilities" id="abilities" rows="10" cols="30"><?php echo stripslashes($row['abilities']); ?></textarea></td>
</tr>
<tr>
<td colspan="2"><label for="aboutyou">About You:</label></td>
</tr>
<tr>
<td colspan="2"><textarea name="aboutyou" id="aboutyou" rows="10" cols="30"><?php echo stripslashes($row['aboutyou']); ?></textarea></td>
</tr>
<tr>
<td></td>
<td><input name="submit" id="submit" type="submit" value="Edit Account" /></td>
</tr>
</table>

</form>

Ok, here is the form.

When I view the source the <form> part isn't being recognized in the browser, this is very strange, any advice?

Link to comment
Share on other sites

This is strange, and far from cool.

The thing is, it's messing up in firefox, ie, and other browsers.

It's also strange, I have them there, there is no javascript throughout the page or anything that could interfere with it.

I have also validated both the xhtml/css to make sure it's valid, and it's 100% valid.

Any advice here, it's strange because only about 3 forms on here are messing up, the rest are fully functional.

Link to comment
Share on other sites

Hehe, it was one of those dumbass things that caused it.

I had the login form disappearing when they logged in, but I had the start tag for it outside the if, and the rest of it, inside.

So the form was started way up there, and was set to action for the homepage, and it kept sending them there, and I didn't see the form field way at the top.

Problem fixed, next time I know what to look for, that was very strange at first, there always seems to be a logical solution when things like this happen, thanks again. (maybe this'll help someone else in the future.)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.