PHP Coding Academy Project 4 - missing something?

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

PHP Coding Academy Project 4 - missing something?

Postby CaptainPasty » Sat Oct 09, 2010 10:21 pm

Hi all,

Finally made it to the last project in the mini book but seem to have hit a snag. MySQL seems to be doing everything it should and I've created the "testing" database with no problems, but when I get as far as running project4.php in my browser I get a blank page. I've taken out the PHP bit and run it with just the HTML code and it displays the forms correctly, so I'm assuming I've either missed something in the PHP section or my setup might be missing something (this happened in another post I made for a problem I had in Project 3). Would anybody mind having a look over my code and checking that I'm not missing anything in it? If all looks ok any suggestions would be great:

<?php
//change "password" to your MySQL password!
mysql_connect("localhost","root","anyoldpassword");
mysql_select_db("testing");
?>

<h1>Add new task</h1>
<form method="post" action="project4.php">
<p>Name it:<input type="text" name="task_name"/></p>
<p>Describe it:<input type="text" name="task_description"/></p>
<input type="submit" value="Add"/>
</form>


Thanks in advance
CaptainPasty
 
Posts: 5
Joined: Sat Aug 28, 2010 10:00 am
Location: Manchester

Nevermind...

Postby CaptainPasty » Sun Oct 10, 2010 10:23 am

Started up my netbook this morning and it's working fine. I think I must have added or replaced some SQL component before I started and forgot to reset...Doh.
CaptainPasty
 
Posts: 5
Joined: Sat Aug 28, 2010 10:00 am
Location: Manchester


Return to Programming

Who is online

Users browsing this forum: No registered users and 3 guests