PDA

View Full Version : Need help with PHP script


idaho
03-27-2009, 05:33 PM
I am authoring a page for a someone and would like to link their existing php script inside my program. Can someone please translate the html to the script I need to add to my submit button? Any help would be great. I've tried searching for an answer but can't find one that works. This is a POST method so I just need the inputs to populate on the website.

Original html:
<form method="post" action="http://www.aspensound.com/phplist/?p=subscribe" name="subscribeform">
<input name="email" type="text" class="input" value="">
<script language="Javascript" type="text/javascript">addFieldToCheck("email","Email Address");</script>
<input type="image" name="subscribe" value="Subscribe" id="imageField" src="images/btn-GO.gif" onClick="return checkform();">
<div style="font-size:11px">
<input type="checkbox" name="list[2]" value="signup" checked>Spokane
<input type="checkbox" name="list[3]" value="signup">Boise
<input type="checkbox" name="list[4]" value="signup">Missoula</div>
</form>

What I have got so far:
data1 = Input.GetText("Input1");
data2 = CheckBox.GetText("list[3]");
data3 = CheckBox.GetText("list[2]");
data4 = CheckBox.GetText("list[4]");
myvalues = {Data1 = data1, Data2 = data2, Data3 = data3, Data4 = data4};
HTTP.Submit("http://www.aspensound.com/phplist/?p=subscribe", myvalues, SUBMITWEB_POST, 20, 80, nil, nil);


When I run a test, I am getting nothing to happen.

Thank you in advance.

Ulrich
03-28-2009, 09:31 AM
You are not sending the email address, which seems to be a required field.
<input name="email" type="text" class="input" value="">
addFieldToCheck("email","Email Address");

Ulrich

idaho
03-30-2009, 11:43 AM
Thank you for the help, however, your code looks like html. I am needing this script to enter into AMS. I think your right about what I need but I need the code to enter into the onclick field for my submit button.