Jump to content

n00b help with php and forms


carlosbeans

Recommended Posts

hey there, i'm carlos, an obvious n00b.

 

i'm working on a site for a record label, Atlas Records, based out of St Augustine (i didn't build it, i didn't slice it up, didn't recommend the iframes, just to clarify!!  ;)), and i'm trying to develop a form that allows the artists to go to a page, that will allow them to enter in their tour dates, submit them, and have them displayed onto a "tours page."

 

i'm using a form in an HTML page to accept the data, but i'm still trying to figure out exactly how to get it to post the way i want.

 

an example of the way the page i'm trying to set up will look like this: www.polyvinylrecords.com/tours.asp

 

i realized they created theirs with ASP, but i'm assuming this can also be accomplished with PHP.  8)

 

i've got a start, you can see it here: http://atlasdistro.com/phpPractice/tourForm.htm

 

the code that i'm using for the php page is something like this:

<html><body>
<?php
$month = $_POST['month'];
$day = $_POST['day'];
$year = $_POST['year'];
$description = $_POST['description'];

echo $month, ".", $day, etc...
?>
<a href="tourForm.htm">Add more dates</a>
</body></html>

 

obviously, the problem i'm having is getting the dates to format properly onto the page and allowing the user to input more than one date for the page.

 

again, i'm a n00b at PHP, so any help, constructive criticism that you might have for me regarding this would be VERY much appreciated! thanks!

Link to comment
https://forums.phpfreaks.com/topic/37466-n00b-help-with-php-and-forms/
Share on other sites

If you want data persistence, then yes you do.

 

At this point it'll post to the other page, however it's only seen by the person who posts it, and only for that one moment. Any time they go back to that page it'll be gone, and nobody else will be able to see it by going to that page, even if they went at exactly the same time.

 

For what you're doing, a database (or flat-file system) is mandatory.

yeah that's the problem i was running into and it makes sense now.

 

told you i'm a total n00b!!

 

i appreciate the help.

 

any good references for a simple database? the server supports MySQL (obviously if it supports PHP!  ;D) so would it require  a terribly complicated database to achieve the functionality that i want?

 

again thanks for all the help

A very simple database will do the trick.

 

MySQL is the usually used one, however, you may run into licensing issues with it.

PostgreSQL and SQLite are two other highly recommended ones, however most people will tell you to go with MySQL anyway.

 

Oh yes, and not all PHP installs support MySQL. While PHP is usually configured with MySQL, it isn't always.

ah i see, interesting. i wasn't aware of that...

 

i guess i'll have to look up some My SQL tutorials or something.

 

i'm not sure where to even begin as far as linking the PHP code to the MySQL data, or calling it.

 

any good resources to study up for this?

Archived

This topic is now archived and is closed to further replies.

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