Contact Form questi...
 
Notifications
Clear all

Contact Form question

4 Posts
2 Users
0 Reactions
1,202 Views
(@lyssa)
Posts: 34
Eminent Member
Topic starter
 

I am working on Heliopolis and have discovered a problem with the contact form.

I thought I had it set up to capture the e-mail and username of the person if they were logged in and send it to me, but that's not working. Basically, if they are logged in,when using the contact form, I want the e-mail to include the username and e-mail from their account.

I also tried to duplicate the form to use as a voting form, and while it displays correctly on the page/website, the form that I am receiving in the mail has the standard format (of the contact form), and not the new categories that I added (vote1, vote2, vote3). Fixed = it was refering back to contact.php and not running vote.php

Can anyone give me a hand through email or YIM so that I can get this working?

webmistress [at] sg1-heliopolis [dot] com


 
Posted : 24/12/2007 10:04 pm
(@lyssa)
Posts: 34
Eminent Member
Topic starter
 

I think I figured out my problem. I think I have the form set up correctly, but the problem lies in my query:

if(!empty($userpenname))

is automatically deferring to false. I need to get the $userpenname before that statement...

I don't know it is all jumbled together and possibly clumsy. I'll put the whole section, and maybe you can figure out what I was trying to do, and where I went wrong.

                $procura_email_sql = mysql_query("SELECT email FROM main_fanfiction_authors WHERE uid = '$useruid'");
$mostra_email = mysql_fetch_array($procura_email_sql);
                $email_usuario = $mostra_email[email];

if(!empty($userpenname))

$output .= "<label for="name">"._YOURNAME.":</label> <INPUT name="name" value="$userpenname"  type="text" class="textbox" size="30" maxlength="200"><INPUT type="hidden" name="uid" value="$useruid"><INPUT type="hidden" name="penname" value="$userpenname"><br />
    <label for="email">"._YOUREMAIL.":</label> <INPUT name="email" value="$email_usuario" type="text" class="textbox" size="30" maxlength="200"><INPUT type="hidden" name="uemail" value="$email_usuario"><br />";
else
$output .= "<label for="name">"._YOURNAME.":</label> <INPUT name="name" id="unlogged"  type="text" class="textbox" size="30" maxlength="200"><br />
    <label for="email">"._YOUREMAIL.":</label> <INPUT name="email" type="text" class="textbox" size="30" maxlength="200"><br />";

 
Posted : 25/12/2007 9:52 pm
(@tammy)
Posts: 2577
Member Moderator
 

First, I'd suggest you use the dbquery, dbassoc, and dbrow functions.  That way if there's an error it will throw some information to you to help you figure out what's wrong.

Second, I think you should be using $email_usuario instead of $userpenname since you're after the email in the first place.


 
Posted : 02/01/2008 4:16 pm
(@lyssa)
Posts: 34
Eminent Member
Topic starter
 

They are both there, or I am trying to get both penname and email.


 
Posted : 02/01/2008 4:22 pm
Share: