Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
PHP Form

 
Post new topic   Reply to topic Printable version
 View previous topic  Mgb Post :: Post split: objects (got bumped)  View next topic  
Author Message
Contempt+
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: May 15 2005
Posts: 682
Location: Home
Offline

PostPosted: Sat Aug 27, 2005 1:42 pm   Post maybe stupid    Post subject: PHP Form Reply to topic Reply with quote

I know that I've asked a couple of you already, but this is strange.

I made a form online using HTML with a responding .php page. That php page sends the data that was inserted in the form to my e-mail address.

Now, the strange part is, all of it works, except for 1 function/command.. (Can't think of the proper name right this minute). And it's right in the middle of the rest of the other commands/functions.

When I click Submit, it sends all the data, except for that one thing, lol.

Here's the code. Oh, and it's a lyric submission form. I got tired of all the crap that's on the lyric websites now, so I'm making one.

Form:
Code: Show/Hide
   <tr>
     <td width="16%" height="22">
     <b><font face="Verdana" size="1">Album:</font></b></td>
     <td width="84%" height="22">
     <font face="Verdana" size="1"><b>
     <input type="text" name"cdtitle" size="34" value=""></b></font></td>
   </tr>


Responding page:
Code: Show/Hide
<?php
  $title = $_POST['title'];
  $artist = $_POST['artist'];
  $cdtitle = $_POST['cdtitle'];
  $body = $_POST['body'];
  $note = $_POST['note'];
  $email = $_POST['email'];


  mail( "my e-mail", "Lyrics",
    "Title: $title; Artist: $artist; Album: $cdtitle; Lyrics: $body; Comments: $note", "From: $email" );

?>


Now, I'm still learning php, but I don't understand why this isn't working. It's the "Album" section, and on the php page, its called "cdtitle". I've tried a few things, and nothings worked. Any help would be appreciated. Thanks.
_________________
SSE Network Administrator
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Maverick
broken record


Age:41
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Sat Aug 27, 2005 2:49 pm   Post maybe stupid    Post subject: Re: PHP Form Reply to topic Reply with quote

Contempt+ wrote:
Code: Show/Hide
name"cdtitle"

forgot the =
_________________
Nickname: Maverick (I changed my name!)
TWCore developer | Subspace statistics
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Sat Aug 27, 2005 3:20 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Nice catch. I looked through the whole thing and never saw that.
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Donkano
Server Help Squatter


Gender:Gender:Male
Joined: Jul 02 2003
Posts: 763
Offline

PostPosted: Sat Aug 27, 2005 3:24 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Dr Brain, simple way of detecting errors:
1st Page 2000
Back to top
View users profile Send private message Add User to Ignore List
Contempt+
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: May 15 2005
Posts: 682
Location: Home
Offline

PostPosted: Sat Aug 27, 2005 5:47 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Ok, but what I don't understand, is that I don't have the = sign for any of the other names, and it works.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:38
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Sat Aug 27, 2005 6:01 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

What the... you've been trying to do this for a month already.
Try packet logging on the client's side and/or echo'ing the results on the server's side, maybe that makes it a little easier to find out.
Back to top
View users profile Send private message Add User to Ignore List
Donkano
Server Help Squatter


Gender:Gender:Male
Joined: Jul 02 2003
Posts: 763
Offline

PostPosted: Sat Aug 27, 2005 6:21 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Contempt+ wrote:
Ok, but what I don't understand, is that I don't have the = sign for any of the other names, and it works.


Use:
Code: Show/Hide
   <tr>
     <td width="16%" height="22">
     <b><font face="Verdana" size="1">Album:</font></b></td>
     <td width="84%" height="22">
     <font face="Verdana" size="1"><b>
     <input type="text" name="cdtitle" size="34" value=""></b></font></td>
   </tr>


Edit:
Reason why is "name" uses the same syntax as "id" and "value" does.

Value is what what appear in the input to the Client's GUI. Name and ID is for labelling.

Name is called from the <form>'s action="" script and can be called from JavaScript

ID is generically used for the <label> command.
Back to top
View users profile Send private message Add User to Ignore List
Donkano
Server Help Squatter


Gender:Gender:Male
Joined: Jul 02 2003
Posts: 763
Offline

PostPosted: Sat Aug 27, 2005 6:26 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Also, size 1 is pretty small, I would reccomend size 2.
Back to top
View users profile Send private message Add User to Ignore List
Contempt+
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: May 15 2005
Posts: 682
Location: Home
Offline

PostPosted: Sat Aug 27, 2005 11:42 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

Oh, I see. I thought you guys were talking about the PHP end of it. I see what I did wrong.

Thanks guys.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Trash Talk All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 48 page(s) served in previous 5 minutes.

phpBB Created this page in 0.620674 seconds : 33 queries executed (80.6%): GZIP compression disabled