0

I just switched webhosting companies and I'm having a major problem now, I keep getting errors that I wasn't getting before. Mainly, these right here:

Notice: Undefined index: username in D:\hshome\c274056\test.yourroommatefinder.com\register\signup.php on line 12

Here's line 12:

$username = mysqli_real_escape_string($dbc, trim($_POST['username']));

Tried this too:

$username = mysqli_real_escape_string($dbc, trim($_POST['username']));

What could be causing this, I even tried it without the mysql real escape. I have the site up on another server, currently with no problems and i have the error set to show the same.

2
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by armyguydave69
0

The server it is working on probably has notices turned off. You should have an if (isset($_POST['username'])) block around that anyway.

0

The server it is working on probably has notices turned off. You should have an if (isset($_POST['username'])) block around that anyway.

Worked like a charm. Thank you.

0

actually now I'm having another issue with it, when it returns sticky date (i.e. the form not completely filled out), it returns a 1 for each field. However, if the form is completed it submits the data to to mysql as is?

What should I check, I'm at a complete lost with this. Like I said, I had no issues on the other server so I'm really confused.

0

Figured it out, instead of just echoing the defined variable name, I have to use $_POST; and it works perfect now.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.