Jul 25, 2008

Help With Simple Php Form

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

free web hosting

Help With Simple Php Form

PlugComputers
Hello all.

I have recently changed some stuff around on my website and now my form email script is not working on the page...heres my situation:

On my website Plug Computers we have custom build configuration pages (for example: http://www.plugcomputers.com/intelschedule2.php

The way the forms results have been done in the past is with a email script where I get the form results in my email. This has worked well, but now it is not working.

I recently added a new script to the page in order to assign dollar values to each of the computer parts via javascript. You can see at the bottom of the page the price is updated depending upon what computer components are selected. Since adding this my script that emails my form results does not work. When you click the submit button on the bottom of the page nothing happens.

Could you please take a look at my source on http://www.plugcomputers.com/intelschedule2.php and tell me what is going on and why are these 2 functions conflicting...

Thanks alot.

 

 

 


Reply

BuffaloHELP
PHP is server side run script, therefore you have to post L10FmX.php source code here in order to see what is not sent correctly.

Obviously you are passing variables to L10FmX.php and this file is doing all emailing and such?

Reply

PlugComputers
Thats right, the whole thing works without the price configuring stuff on the page. Once i added all the [+$x] stuff with values and the price calculator at the bottom the 2 seem to be conflicting somewhere..

Reply

BuffaloHELP
I thank you for validating my assumption. So where is the script code to be examined, like I asked? dry.gif

Reply

PlugComputers
CODE


// configuration variables
//
//////////////////////////////////////////////////////////////////////////////////////

// List all domains, including posible subdomains (e.g. www.) that are allowed to submit
// requests to this script and the domains of any posible recipient email address.

$validReferrers = array('plugcomputers.com','www.plugcomputers.com','');

// Use the this array (or create new arrays with a different association) to replace
// setting fields in the form. Don't delete the 'default' array.

$formAction['default'] = array(
    'recipient' => 'sales@plugcomputers.com',
    'recipient_cc' => '',
    'recipient_bcc' => '',
    'subject' => 'Schedule your Build Form',
    'redirect' => 'http://www.plugcomputers.com/success.php',
    'email' => '',
    'realname' => '',
    'required' => '',
    'format' => 'html',
    'sesrep_max_items' => '10',
);

// If set to 0, the form can set the email recipient. For security reasons you should
// set this variable to 1.

$disableFormRecipients = 1;



That is the configuration part of L10FmX.php, it says not to touch the rest of it, so I didn't. I just configured this part with my email, referrers, redirect, ect. as you can see.

Anything look weird about this?

I'm not so sure there is anything wrong with this L10FmX.php because it was working perfectly fine before I added the price calculator on the page. Now it seems the 2 will not function together.

 

 

 


Reply

PlugComputers
BuffaloHelp-

I figured something out (there were 2 opening <form... tags and the first one that the page encounters is what is uses and as result the second one is just content within the first form) but am now having a problem with the price calculator (theForm22)

This is what the code on my page looked like before...
CODE

<form name="theForm22" onclick="getTotal() ">

<form name="theForm" action="L10FmX.php" METHOD="POST">
<input type="hidden" name="required" value="email,realname">



I tried flipping the placement of the 2 <form tags so that it would execute the L10FmX.php first:
CODE

<form name="theForm" action="L10FmX.php" METHOD="POST">
<input type="hidden" name="required" value="email,realname">
        
<form name="theForm22" onclick="getTotal() ">


Now after doing this it DOES submit and will send the emails like its supposed to, but now the price calculator (theForm22) will not work. Any way to make both of these work?

Reply

shadowx
im not very good with JS but surely you can cut the "OnClick" event from form22 and paste that into the first form's tag and it should work right?

Reply

PlugComputers
QUOTE(shadowx @ Dec 24 2006, 11:38 AM) *

im not very good with JS but surely you can cut the "OnClick" event from form22 and paste that into the first form's tag and it should work right?


I tried that, so now the coding looks like this:
CODE

<form name="theForm" action="L10FmX.php" METHOD="POST" onclick="getTotal()">
<input type="hidden" name="required" value="email,realname">


But its the same as before, the email script works now, but the not the total at the bottom of the page does not even show up. You click the parts and nothing shows up at the bottom.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. l10fmx.php - 141.97 hr back. (1)
  2. l10fmx.php" - 166.32 hr back. (1)
Similar Topics
Looking for simple, php, form

Searching Video's for simple, php, form
advertisement



Help With Simple Php Form



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE