Jump to content

Need help in creating a task/task viewer in html, please


ProSpartan

Recommended Posts

Hello, This is my first time posting and as my first posting, it's going to be a tall order to fill. I've had a little experience in html programming and a substantial amount more in programming(VB, C#, C++, Java). I've come here because I need help from the experts in HTML programming. What the title, I hope, explains is that I would like to make a web page that a user can use to create a task via text box, importance level descending from Highly Important/Important/Can Wait, day and time assigned, and the submit button, then the web page adds it to a list which the user can view, as well as a check box, or something, that will select it and if the user desires, press a delete button, assuming the task is completed. The list is not to be user specific, because it's only going to be used between another person and myself. I'm pretty sure i'm going to need a database of some sort in MySQL or something, but I don't know how to do that. I don't expect someone to have all the info, which is fine. I can do the basic text box, radio buttons for importance, and submit button but that's about it. Beyond is where i need the help. Anyway, if you can help, that would be cool. Thanks! ProSpartan P.S. I added a base line .html file that contains the basic stuff. If anyone can help, you can use that for building onto it. Thanks again.

Tasks to Complete.html

Link to comment
Share on other sites

You're moving in the right direction. Please note that it's the $_POST array not the $_POSTS array. Consequently, that means you didn't test your script before posting it. Please test before posting from now on and let us know what errors you're getting (if any). Any way, you've chosen the $_POST array. What are you going to do with it?

Edited by niche
Link to comment
Share on other sites

Going to want to display it, and down the line, save it to a database. Would i want another form that displays the information, as well as another php page that gets the info for the form? Or maybe assign it to a declaration, which according to my search is '$Example =" followed by the POST statments. I did try it, but even though i pressed the submit button, nothing happened. Even after the change from POSTS to POST.

Edited by ProSpartan
Link to comment
Share on other sites

Then that's where you need to start. Comment-out your the code you have in tasks.php and put this simple code in it:

<?phpecho "here";?>

and run your form code. Did tasks.php display "here"?

Link to comment
Share on other sites

No, it did not display when i pressed the submit button. It may be some settings on IE, but i can not do anything about it. When i get home, i will try it and see if it works. I changed the beginning of each POST statement with $Task = <?php echo $_POST["task"]; ?> and so on with the others.

Edited by ProSpartan
Link to comment
Share on other sites

more importantly, are you testing this on a webserver? Either installed locally using something WAMP or MAMP, or on a hosted server that supports it? Executing PHP requires more of your system then just what you would normally need to test HTML/CSS.

Link to comment
Share on other sites

more importantly, are you testing this on a webserver? Either installed locally using something WAMP or MAMP, or on a hosted server that supports it? Executing PHP requires more of your system then just what you would normally need to test HTML/CSS.
Well, that could be the problem then, haha. I'm doing it on the localhost, nothing else.
Link to comment
Share on other sites

I don't know. I't a standard install, as far as i know, and have no access to download things. although, i may be able to use a stand-alone computer and have someone else download it.

Link to comment
Share on other sites

Okay, so i am now running a php compatable computer. It does not print simple messages like <?php echo "Hello World!"; ?>, nor is it accepting miltiple assignments via $Example = .... , atleast not in gedit, but in Emacs, it does.

Edited by ProSpartan
Link to comment
Share on other sites

Here is the php:

<html><body><?php$Task = echo $_POST["task"];$Importance = echo $_POST["importance"];$Date = echo $_POST["date"];$Time = echo $_POST["time"];echo $Task;?></body></html>

<html><head><title>Tasks to Complete</title></head><body><table border="1" width="100%" height="100%"><tr width="100%" height="10%">  <td colspan="2" height="10%">   <h2 align="center">Welcome to the Task List</h2>  </td></tr><tr width="100%" height="90%">  <td width="50%" height="100%">   <form action="tasks.php" method="post">    <fieldset>	 <legend>Enter New Task</legend>	 <textarea rows="15" cols="50" name="task"></textarea>	 </br>	 </br>	 <input type="radio" name="importance" id="highly important">Highly Important</input>	 </br>	 <input type="radio" name="importance" id="important">Important</input>	 </br>	 <input type="radio" name="importance" id="can wait">Can Wait</input>	 </br>	 <p>Date Assigned    <input type="text" name="date" id="date"></input></p>	 <p>Time Assigned    <input type="text" name="time" id="time"></input></p>	 <input type="submit" id="submit" value="Submit Task"></input>    </fieldset>   </form>  </td>  <td width="50%" height="100%">     <iframe width="100%" height="100%" name="tasksviewr">         </iframe>  </td></tr></table></body></html>

Link to comment
Share on other sites

take the echo out of your assignment statements, i.e.
$Task = $_POST['task'];echo $Task;

Okay, i took out the echo's, but it did not display anything when it when to the next screen, opening tasks.php.
Assuming your scripts work, what are you going to do with your form data?
I'm going to want to save it in a database.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...