be sure to turn on your error handling

<?php
error_reporting(E_ALL);
?>

you can also try

<?php
header("Location: http://www.yoursite.com/index.php");
?>

be sure to include:

error_reporting(E_ALL);

at the top of your page to ensure error reporting is turned on.

also, i notice in your HTML for the Phone Number and E-Mail Address that the input boxes are not closed.

      <tr> <td>Phone Number:</td>
        <td align="right"> <input type="text" name="phoneNumber"</td></tr>
        <tr> <td>Address:</td>
        <td align="right"> <input type="text" name="address"</td></tr>

should be

<tr> <td>Phone Number:</td>
<td align="right"> <input type="text" name="phoneNumber"></td></tr>
<tr> <td>Address:</td>
<td align="right"> <input type="text" name="address"></td></tr>

i hate people who copy/paste code, and when it doesn't work, post it to a forum instead of trying to solve it yourself.

to View usernames
[code]
$result = mysql_query("SELECT * FROM users");
while($r = mysql_fetch_array($result)) {
echo "$r['full_name']<br>";
echo "$r['username']<br>";
echo "$r['password']<br>";
}
[/code]

You did not provide your MySQL structure, so those values may be different.

As for changing a password, you'll need to setup an Edit page, and you'll be using MySQL's UPDATE function. Google it.

Pretty sure you need single quotes wrapped around all of your INSERT Values.

@ardav he never marked it as "Solved", so I figure the person was too lazy to solve your riddle. Stupid semi-colons!

you forgot a semi-colon on line 2
[code]
session_start();
[/code]

Your forms action is set to Login.php, which is the form page. All and all this looks really mixed up. Set the action to loginhome.php.

You can access WAMPP by going to [url]http://localhost[/url] in your web browser. This will give you all the basic information on your WAMPP install.

A basic PHP MySQL connection looks like this:

[code]
<?php
// config.php //
mysql_connect('localhost','username','password');
mysql_select_db('database_name');
?>
[/code]

A basic MySQL query is:
[code]
<?php
include('config.php');

$sql = "SELECT * FROM table_name";
$result = mysql_query($sql);
?>
[/code]

Generally speaking, you have a LOT of reading and learning to do. Spend more time doing that then making forum posts, the only way to figure this stuff out is to try it yourself.

We recently moved over to a IIS server (from Linux....don't ask me why), and it was a server problem. I re-installed FastCGI and set my php.ini back to default and went through the settings again.

Stupid IIS. Thank you pritaeas for making the gears in my head move =)

It never gets to the query. It's as if the request overflows, and sputters into a 404 page.

I cannot echo/print out my query. When the page does 404 Error, this is an example of a URL:

[url]http://.....query.php?formname=edit_user&id=2115&building=1010+Waveland&order_received=2012-01-05&order_received_dp=1&order_received_year_start=2000&order_received_year_end=2015&order_received_mon=&order_received_da1=1210654800&order_received_da2=1425189600&order_received_sna=1&order_received_aut=&order_received_frm=&order_received_tar=&order_received_inp=&order_received_fmt=j+F+Y&order_received_dis=&order_received_pr1=&order_received_pr2=&order_received_prv=&order_received_pth=calendar%2Fcalendar%2F&order_received_spd=[/url][]&order_received_spt=0&order_received_spr=&appointment_date=0000-00-00&appointment_date_dp=1&appointment_date_year_start=2000&appointment_date_year_end=2015&appointment_date_mon=&appointment_date_da1=1210654800&appointment_date_da2=1425189600&appointment_date_sna=1&appointment_date_aut=&appointment_date_frm=&appointment_date_tar=&appointment_date_inp=&appointment_date_fmt=j+F+Y&appointment_date_dis=&appointment_date_pr1=&appointment_date_pr2=&appointment_date_prv=&appointment_date_pth=calendar%2Fcalendar%2F&appointment_date_spd=[]&appointment_date_spt=0&appointment_date_spr=&tenant_name=Lorax+TEST&tenant_email=butisnecessary&building_address=1010+Waveland&unit=600&time1=Not+Set&time2=Not+Set&phone=7738705442&receiver_type1=Standard&rid1=&ac1=&receiver_type2=None&rid2=&ac2=&receiver_type3=None&rid3=&ac3=&receiver_type4=None&rid4=&ac4=&status=NTC&paid=Yes&amount=&notes=Lorem+ipsum+dolor+sit+amet%2C+consectetur+adipiscing+elit.+Duis+congue+lorem+eget+sapien+lobortis+in+vulputate+enim+sodales.+Nunc+blandit+sapien+at+orci+commodo+gravida.+Praesent+nec+ultrices+justo.+Suspendisse+vitae+placerat+ligula.+Nam+convallis+aliquam+diam+ac+placerat.+Suspendisse+potenti.+Cras+in+pretium+odio.+Mauris+consequat%2C+massa+id+congue+condimentum%2C+magna+enim+egestas+ligula%2C+eu+laoreet+odio+nisl+non+sapien.%0D%0A%0D%0ANam+lectus+tellus%2C+molestie+ut+iaculis+nec%2C+facilisis+volutpat+massa.+Nullam+vestibulum+orci+vel+magna+eleifend+varius.+In+at+vulputate+justo.+Phasellus+nec+enim+ut+lorem+blandit+lobortis+et+nec+justo.+Nunc+et+quam+vel+erat+congue+adipiscing.+Nullam+placerat+adipiscing+lectus+vitae+tempus.+Ut+in+pulvinar+dolor.+Ut+pulvinar%2C+sapien+vehicula+congue+adipiscing%2C+turpis+ligula+dapibus+augue%2C+nec+molestie+lorem+dui+ac+ipsum.+In+id+nunc+at+nisi+consectetur+congue

My post_max_size is already set to 80m. I'm not uploading a file, just running a mysql UPDATE query with a large amount of text. Once the text hits a certain limit, the form submission goes to a 404 page.

New tenants with little to no "notes" never have this problem. The issue only occurs with tenants with a large amount of notes that are being added onto.

My program is a simple client database that holds information on tenants. Each tenant has a LONGBLOB column called 'notes' to hold updated information on them.

For tenants that have a long list of notes, when the form is submitted the site actually goes to a 404, so their profile never gets updated.

Is there a HTTP limit to POST/GET characters that can be sent? I cannot figure out if this problem is being caused by PHP or IIS, as this has never happened before.

Any help is appreciated, sorry if my explanation is bad.

Read over your table structure again, so yes, comment_id will be your page_id, but since the names are a little confusing I'd change it from comment_id to page_id.

You're database table would just include an extra column called 'type' to designate if they were a Doctor, Nurse, etc....

I agree with ardav, a simple login script will do just fine. Upon the sql query include a check for their 'type' and you're set.

I am working off of an old project, and instead of having to re-write the entire system, I am making edits to the current one.

Generally I tend to store all date values as unix timestamps (strtotime) and never use MySQL's Date Time format.

Problem solved:
[code]
$sql = "SELECT * FROM timeclock WHERE user = 'mdloring' AND punch_in BETWEEN '26-12-2011' AND '9-01-2012' ORDER BY punch_in DESC";
[/code]

By simply removing the leading 0 from 09, the query worked just fine. Wahoo!

Please post your PHP code so we can lead you in the right direction.

Undefined index errors normally come from variables being called for but don't necessarily exist yet.

I edited your code:
[code]
<?php
$drinks = $_POST['drink']; //here is your error, change to:
if(isset($_POST['drink'])) {
$drinks = $_POST['drink'];
$drink1 = $drinks[0];
$drink2 = $drinks[1];
}

if(isset($_POST['first_name'])) { $first_name = $_POST['first_name']; }

} else {
$first_name = "unknown";
echo $first_name;
}
[/code]

Hope this clears things up for you.

inni2626 commented: thanks +1

I'm having some trouble collecting data between 2 different years (ie: December 2011 & January 2012).

This is a timeclock system where punches are stored as: DD-MM-YYYY (31-12-2011).

I want to be able to search for dates between: DD-MM-2011 through DD-MM-2012 but am coming up empty. When using the same year the query works just fine. Here is my failed code:

[code]
$sql = "SELECT * FROM timeclock WHERE user = 'mdloring' AND punch_in BETWEEN '26-12-2011' AND '09-01-2012' ORDER BY punch_in DESC";
[/code]

There are no MySQL errors, so I think it has something to do with the way I store my dates. I know that MySQL's default date storage is YYYY-MM-DD but I rarely use that.

Any help is greatly appreciated.

Please post some code so that users can help guide you. Don't expect anyone here to do your job for you =)

If you can pick up PHP or Java, you can learn HTML in a matter of hours. Today is not about knowing 1 language, but being comfortable with multiple ones.

I'm 25 with a History degree and make just under 100k programming PHP/MySQL/HTML/CSS and a little Java/AJAX/jQuery. No stupid Comp Sci degree, no certifications.

Money wise, learn .NET/ASP and you will seriously bank. Understand the ins and outs of programming with Microsoft's Sharepoint is highly lucrative.

[QUOTE=bo0ga;1719497]Thanks for the replies. Another quick question. Is PHP necessary if a person is to use a content management system such as Wordpress/Joomla? I kind of see HTML unncessary to learn for example since programs generate the HTML for you .. can the same be said for PHP?[/QUOTE]

Page with the form:
[code]
<form action='data_page.php' method='post'>
Username: <input type='text' name='user'><BR>
Password: <input type='password' name='pass'><BR>
<input type='submit' value='Login'>
</form>
[/code]

Page that accepts the form data:
[code]
if(isset($_POST['login'])){
$user = $_POST['user'];
$pass = $_POST['pass'];

if ($user == "Enter" && $pass == "12345"){
echo "Access Granted";
}else{
echo "Access Denied";
}
}
[/code]

You don't need to use a SESSION unless you are using multiple "member only" pages (correct me if I'm wrong please). In general though, using SESSIONS is a good idea for obvious security reasons.

First off, welcome to the utterly miserable world of the Windows Server Environment.

I struggled with this same exact issue, and spoke to one of my Networking guys here at work. It ended up being an issue with the ACL, and our Network guy had to add an exception on the network to allow SMTP emails to be sent from a web site.

For me it wasn't a programming issue, but instead a Networking/Server Admin problem. Talk to those guys in your office and you should be fine. Your code looks good to me, but normally Auth issues are networking problems (unless your credentials are a bad username/pw).

Good Luck!

jacob,

you'll need to format the text before you input it into your db, which can be done in a few different ways:

[code]
if(isset($_POST['textarea'])) {
$textarea = mysql_real_escape_string($_POST['textarea']);
}
[/code]

OR

[code]
if(isset($_POST['textarea'])) {
$textarea = addslashes($_POST['textarea']);
}
[/code]

Depending on how secure you need to be. Complete the MySQL INSERT the way you normally would. Hope this helps.

the exact same thread 3 times in a row? ::cough:: ban ::cough::

they probably used a mysql injection. clean up your php code. those guys aren't hackers, they're little script kiddies who manipulated your code. they didn't brute force their way in.

your site was hacked because of your own code.

Not sure if this is a PHP problem or IIS7 issue:

My form is used for editing client information, and it has worked flawlessly for the last year until now. Some clients have more "Notes" about their file than others, and recently clients with a lot of "Notes" have been causing 404 Errors when trying to update their file.

I've already set my post_max_size to 50M, and my memory_limit is set to 128M.

My "Notes" column is set to BLOB (I've tried VarChar, Text, LongText, etc...), but to no avail.

BLOB columns don't have a max size, so I do not think this is a MySQL issue. There is no MySQL error displayed, instead, on form submission the page simply goes to a 404 "The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable."

This is running off of my own IIS7 Windows 2008 machine, which leads me to believe that there may be some server configuration that needs to be done. Any help is greatly appreciated.

Michael

Very easy to do. What's funny is that sending a text message is no different then sending an email. Though depending on the provider the "address" changes a bit, but this tutorial will give you all the information you need!

David Walsh's SMS with PHP - [url]http://davidwalsh.name/send-text-message[/url]

Like I said before, what does your genre.php code look like? Not exactly sure what the "problem" you're having is anymore.

What does your genre.php code look like? Instead of ID, you can search by name... (SELECT * FROM games WHERE genre = '$genre_name')

My above code will store the genre as the genre name (not the genre id) in your games table.

My comments are in the code. Hope this helps!

game_insert.php
[code]
<?php
//game_insert.php
include('config.php');

$d = date("d");
$m = date("m");
$y = date("Y");
$Xdate = "$d/$m/$y";

$name = addslashes($_POST['name']);
$poster = addslashes($_POST['poster']);
$genre = addslashes($_POST['genre']);
$console = addslashes($_POST['console']);
$company = addslashes($_POST['company']);
$oldprice = addslashes($_POST['oldprice']);
$newprice = addslashes($_POST['newprice']);
$status = addslashes($_POST['status']);
$copies = addslashes($_POST['copies']);
$details = addslashes($_POST['details']);
$video = addslashes($_POST['video']);
$link = addslashes($_POST['link']);
$rate = addslashes($_POST['rate']);

   //find the name of the genre
      $sql = "SELECT name FROM genre WHERE id = '$genre'";
       $result = mysql_query($sql);
         while($genre_name = mysql_fetch_array($result)) {
            $genre = $genre_name['name'];
          }
        //the above code should produce the genre name based off the id

if ($name == ""){
echo "<div align='center'>You Must Fill All Fields<a href='javascript:history.back(1)'>( Back )</a></div>";
}else{
$query = @mysql_query ("INSERT INTO games (name,poster,genre,console,company,oldprice,newprice,status,copies,details,video,link,rate,date) VALUES ('$name','$poster','$genre','$console','$company','$oldprice','$newprice','$status','$copies','$details','$video','$link','$rate','$Xdate')") or die ("Error");
echo "<p align=center>Game Added ..</p>";
echo "<META HTTP-EQUIV='refresh' CONTENT='1; URL=Game_Add.php'>";
}

?>

[/code]