Author Topic: Contact Form  (Read 7244 times)

0 Members and 1 Guest are viewing this topic.

Offline spoiledRHOtten

  • Newbie
  • *
  • Posts: 42
    • View Profile
Contact Form
« on: June 14, 2003, 11:13:04 PM »
Is there a mod for a contact form so that users can contact the admin?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Contact Form
« Reply #1 on: June 14, 2003, 11:17:13 PM »
no, not that I aware of
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline spoiledRHOtten

  • Newbie
  • *
  • Posts: 42
    • View Profile
Contact Form
« Reply #2 on: June 15, 2003, 05:42:26 AM »
Hi! I found a php contact form on Hotscripts.com.

Can someone please telll me how to incorporate this into the page?

Quote
<form action="addmail.inc.php" method="post">
                    <table>
                      <tr>
                        <td>Name&nbsp;:&nbsp;</td>
                        <td><input name="name" type="text" /></td>
                        <td>&nbsp;*</td>
                      </tr>
                      <tr>
                        <td>Email&nbsp;:&nbsp;</td>
                        <td><input name="email" type="text" value="@." /></td>
                        <td>&nbsp;*</td>
                      </tr>
                      <tr>
                        <td>Message&nbsp;:&nbsp;</td>
                        <td><textarea cols="20" name="textarea" rows="5"><?php print("Hello webmaster,\n\n"); /* your name */ ?></textarea></td>
                        <td>&nbsp;*</td>
                      </tr>
                      <tr>
                        <td></td>
                        <td><input name="submit3" type="submit" value="Send" />
                          <input name="reset" type="reset" value="Reset" /></td>
                        <td></td>
                      </tr>
                      <tr>
                        <td colspan="3">&nbsp;</td>
                      </tr>
                      <tr>
                        <td colspan="3">* = required field.</td>
                      </tr>
                    </table>
                  </form>


Here is my contact.php:

Quote
<?php
$templates_used = 'home,category_bit,whos_online,thumbnail_bit,member,comment_bit';
$main_template = 'contact';

define('GET_CACHES', 1);
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();
include(ROOT_PATH.'includes/page_header.php');


//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  "msg" => $msg,
  "clickstream" => $clickstream,
  "lang_category" => $lang['category'],
  "lang_added_by" => $lang['added_by'],
  "lang_description" => $lang['description'],
  "lang_keywords" => $lang['keywords'],
  "lang_date" => $lang['date'],
  "lang_hits" => $lang['hits'],
  "lang_downloads" => $lang['downloads'],
  "lang_rating" => $lang['rating'],
  "lang_votes" => $lang['votes'],
  "lang_author" => $lang['author'],
  "lang_comment" => $lang['comment'],
  "lang_prev_image" => $lang['prev_image'],
  "lang_next_image" => $lang['next_image'],
  "lang_file_size" => $lang['file_size']
));

$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
?>


Can someone  please help me?

whenever I input the form into the contact.html. I get the following error.

Quote
Parse error: parse error, unexpected '<' in /home/virtual/site23/fst/var/www/html/4images/includes/template.php(133) : eval()'d code on line 459


It is weird because the contact.html was a direct copy of the details.html without all of the photos references...so basically, it was a shell of the details.html.

Any help would be appreciated!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Contact Form
« Reply #3 on: June 15, 2003, 06:03:00 AM »
please read in FAQ how to include files into templates:
change this line:
Code: [Select]
<td><textarea cols="20" name="textarea" rows="5"><?php print&#40;"Hello webmaster,\n\n"&#41;; /* your name */ ?></textarea></td> to this:
Code: [Select]
<td><textarea cols="20" name="textarea" rows="5">
<?php
print&#40;"Hello webmaster,\n\n"&#41;; /* your name */
?>

</textarea></td>
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline spoiledRHOtten

  • Newbie
  • *
  • Posts: 42
    • View Profile
Contact Form
« Reply #4 on: June 15, 2003, 06:29:22 AM »
GREAT! THank you!

I figured it out! :)
I haaaaaaaaaaave a contact form! (CHEESE)