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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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