cgull 25 Light Poster

I think it might be because of these lines:

<option value="" selected="true"></option>

It sees the option as selected and inserts value 0 into the table.

cgull 25 Light Poster

Hi,
I never used iframe so I'm not sure, but I would say you would need to call the php parent page and send it parameters.

Something like:

<a href="parent.php?parameter1=something&ampparameter2=something">Call Parent</a>

I need more details of what you are trying to do, in order to help.

cgull 25 Light Poster

I don't know if that is the problem but you don't close the table and the form tags in your form.

I tried this:

echo '
	<form method="POST" action="send2.php">
	<table cellpadding="0" cellspacing="0" border="1">
		<tr>
			<td width="240"><font class="ws14" face="Times New Roman" size="4">
			<b>Pepperoni</b></font></td>
			<td width="100" align="center">
			<input type="checkbox" name="pizza1" value="Chicken">Chicken</td>
			<td width="100" align="center">
			<input type="checkbox" name="pizza1" value="pepperoni">Pepperoni</td>
			<td align="center" width="100">
			<input type="checkbox" name="pizza1" value="bacon">Bacon</td>
			<td align="center" width="100">
			<input type="checkbox" name="pizza1" value="greenpapper">Greenpepper</td>
			<td align="center" width="100">
			<input type="checkbox" name="pizza1" value="hotpapper">Hotpepper</td>
		</tr>
</table>
<input type="submit" value="submit" />
</form>';

In the send2.php I used echo $pizza and it printed: Chicken

cgull 25 Light Poster

Try:
echo '<iframe>';
include 'ianswer.php';
echo 'etc. </iframe>';

cgull 25 Light Poster

I think instead of this line:
$query = "SELECT tour_amount, tour_name FROM `tbl_tour_profile`
WHERE tour_code = '$code'";

You should have:
$query = "SELECT tour_amount, tour_name FROM tbl_tour_profile
WHERE tour_code = '$code'";

No ' around the table name

cgull 25 Light Poster

I think it looks like it moves because you use percentages, and when you zoom out the percentage the div takes out of the page grows.
Just a thought

cgull 25 Light Poster

Maybe because of this?

$Skill1 = Trim(stripslashes($_POST));

When the name of the select does not have space in it: Skill1

cgull 25 Light Poster

try:

.contet { width: 90%; margin: 0 auto; }

cgull 25 Light Poster

Or maybe try:
<div style="float: left; width: 50%;">
<table>....
</div>
<div style=float: left; width: 50%;">
<table>....
</div>

cgull 25 Light Poster

Do you maybe mean when something changes in the database the user should be notified by email? Like if someone answered his post?

cgull 25 Light Poster

Halleluya !!!! I found it, the form's action was wrong, it sent the user back to the contact form when it sould send back to the thank you page.

Again, thank you very much for trying to help.

cgull 25 Light Poster

Thank you very much for trying, but nope, that didn't help either. :(

cgull 25 Light Poster

Thank's I know that's my problem but I don't know why. It is working fine on the other site. I need the page to move to a thank you page after submitting the form so I need this code.

And there is a check when this function is being called:

if(isset($_POST['submitted']))
{
if($formproc->ProcessForm())
{
  $formproc->RedirectToURL("index.php?content=thankyou");
}
}
cgull 25 Light Poster

Hi,

Try this book: PHP 5 CMS Framework Development or this site: http://www.intranetjournal.com/articles/200407/pij_07_06_04a.html

Good luck, busy learning myself how to crate one.

cgull 25 Light Poster
<?php
/*
    Contact Form from HTML Form Guide

    This program is free software published under the
    terms of the GNU Lesser General Public License.

This program is distributed in the hope that it will
be useful - WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

@copyright html-form-guide.com 2010
*/
require_once("class.phpmailer.php");

/*
Interface to Captcha handler
*/
class FG_CaptchaHandler
{
	function Validate() { return false;}
  function GetError(){ return '';}
}
/*
FGContactForm is a general purpose contact form class
It supports Captcha, HTML Emails, sending emails
conditionally, File atachments and more.
*/
class FGContactForm
{
  var $receipients;
  var $errors;
  var $error_message;
  var $name;
  var $email;
	var $phone;
  var $message;
  var $from_address;
  var $form_random_key;
  var $conditional_field;
  var $arr_conditional_receipients;
  var $fileupload_fields;
  var $captcha_handler;

  var $mailer;

  function FGContactForm()
  {
    $this->receipients = array();
    $this->errors = array();
    $this->form_random_key = 'HTgsjhartag';
  	$this->conditional_field='';
    $this->arr_conditional_receipients=array();
    $this->fileupload_fields=array();

    $this->mailer = new PHPMailer();
    $this->mailer->CharSet = 'utf-8';
   }

   function EnableCaptcha($captcha_handler)
   {
			$this->captcha_handler = $captcha_handler;
      session_start();
   }

   function AddRecipient($email,$name="")
   {
			$this->mailer->AddAddress($email,$name);
   }

  function SetFromAddress($from)
  {
		$this->from_address = $from;
   }
   function SetFormRandomKey($key)
   {
   		$this->form_random_key = $key;
	 }
   function GetSpamTrapInputName()
   {
   		return 'sp'.md5('KHGdnbvsgst'.$this->GetKey());
   }
   function SafeDisplay($value_name)
   {
   		if(empty($_POST[$value_name]))
      {
      	return'';
      }
      return htmlentities($_POST[$value_name]);
    }
    function GetFormIDInputName()
    {
        $rand = md5('TygshRt'.$this->GetKey());

        $rand = substr($rand,0,20);
        return 'id'.$rand;
    }

    function GetFormIDInputValue()
    {
        return md5('jhgahTsajhg'.$this->GetKey());
    }

    function SetConditionalField($field)
    {
        $this->conditional_field = $field;
    }
    function AddConditionalReceipent($value,$email)
    {
        $this->arr_conditional_receipients[$value] =  $email;
    }

    function AddFileUploadField($file_field_name,$accepted_types,$max_size)
    {

        $this->fileupload_fields[] =
            array("name"=>$file_field_name,
            "file_types"=>$accepted_types,
            "maxsize"=>$max_size);
    }

    function ProcessForm()
    {
        if(!isset($_POST['submitted']))
        {
           return false;
        }
        if(!$this->Validate())
        {
            $this->error_message = implode('<br/>',$this->errors); …
cgull 25 Light Poster

Hello,

I have a new website that I have created, and when I test it and submit the contact form I get this error:

Warning: Cannot modify header information - headers already sent by (output started at /home/breadan1/public_html/clunyanimaltrust.za.org/index.php:7) in /home/breadan1/public_html/clunyanimaltrust.za.org/content/fgcontactform.php on line 143

I googled it, tried everything that I could find, but can't fix this problem.

No blank spcaces between php tags and this form is working fine on a different site I have.

Any ideas?

The site: http://www.clunyanimaltrust.za.org

Thank you,

Sigal

cgull 25 Light Poster

Try this one, vertical-align: text-bottom seems to be working.

<span style="font-size: 16px; font-weight: bold; vertical-align: text-bottom;">Zebra Touring</span>

Thank you, Thank you, THANK YOU ! that helped :)

cgull 25 Light Poster

Can you please share us the website url? Let see i can able to find something or not?

Thanks, the site is not online yet, so I put this page on my server:
http://breadandcoffee.co.za/rolf/index-1ReadMore.html

cgull 25 Light Poster

Have you tried

style="vertical-align: bottom;"

to the parent element of 16px and 12px text line.

Thank you, but I did try that before I posted here and it doesn't help:

<p style="padding-bottom: 20px; vertical-align: bottom;"><span style="font-size: 16px; font-weight: bold;">Zebra Touring</span> specialises in short day trips, 8-12 day Golf tours and safaris, as well as airport shuttle services for Johannesburg, Pretoria and Lanseria.</p>
cgull 25 Light Poster

Hello, I have a line where the first words are 16px and the rest are 12px.

How do I align to words to the bottom of the line?

Right now, the smaller text appears in the middle of the line.

I am attaching a screenshot, the first paragraph is the one I need to fix.

Thanks for the help.

cgull 25 Light Poster

Thank you very much.

Going to check the site you sent me, this issue is very confusing to me, hopefully, I'll be able to clean my brain and understand.

Probably need to give it a break and try again tomorrow :)

cgull 25 Light Poster

Thank you very very much.

Do you know of any site where there is a nice tutorial to learn this function?

I looked at: http://www.php.net/preg_match and http://php.about.com/gi/o.htm?zi=1/XJ&zTi=1&sdn=php&cdn=compute&tm=29&f=10&tt=29&bt=1&bts=1&zu=http%3A//weblogtoolscollection.com/regex/regex.php

But still struggling to understand.

I don't see they are using the character: @ is this an openning and closing char for a preg_match pattern?

And the \d?

Any good tutorial out there?

Thanks again your answer did solve my error, but I would like to learn so I'll be able to solve all the eregi functions I still have in that code.

cgull 25 Light Poster

Hello,

As much as I try I can't totally understand how to use preg_match.

I have downloaded an open source system from the internet that I want to use, but they use ergei in their code.

When I change it to preg_match I get all kinds of errors.

Can someone please help me and tell me what is this code trying to do and how to fix the error that I get?

!eregi ("^([0-9]?[0-9])+[-|/|.]+([0-9]?[0-9])+[-|/|.]+(([0-9]{2})|([0-9]{4}))$", $from_date, $date_regs)

I have changed it to !preg_match, but then I get this error:

Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\wamp\www\millery\content\time\time\reports\timerpt.php on line 236

I keep trying to fix these eregi to preg_match and keep getting all kinds of errors.

Can someone please help?