Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
how do i upload a php script for my website?
Old 10-03-2010, 10:26 PM how do i upload a php script for my website?
Novice Talker

Posts: 11
Trades: 0
Hello people,
im a newbie here. how do i upload a php script on my website to work?? im using dreamweaver. The script is a contact page where customers submit there imformation. would using mysql.com be easy??
vclass is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-03-2010, 10:28 PM Re: how do i upload a php script for my website?
jazfoto's Avatar
Average Talker

Posts: 18
Name: Jaz
Trades: 0
php is uploaded just like html, connect dreamweaver with FTP to your website and Upload (put)
__________________

Please login or register to view this content. Registration is FREE

photo / design
jazfoto is offline
Reply With Quote
View Public Profile
 
Old 10-04-2010, 12:14 AM Re: how do i upload a php script for my website?
Novice Talker

Posts: 11
Trades: 0
it says i need a host name? does this mean i have to register it for hosting??
vclass is offline
Reply With Quote
View Public Profile
 
Old 10-04-2010, 04:43 AM Re: how do i upload a php script for my website?
miki86's Avatar
Extreme Talker

Posts: 185
Location: print_r($serbia);
Trades: 0
Login to your web host control panel, you have a file manager there, they sent you account details right?
miki86 is online now
Reply With Quote
View Public Profile
 
Old 10-06-2010, 06:47 PM Re: how do i upload a php script for my website?
Novice Talker

Posts: 11
Trades: 0
yeah i had just setup the hosting account. i have the php script and made the contact page. i uploaded them both into the FTP server and it doesnt work. like when i click submit button it just refreshes the page. like how do i collect the users imformation?? like once they submit where does it go??? i want it to be in a email to me.
vclass is offline
Reply With Quote
View Public Profile
 
Old 10-07-2010, 03:36 AM Re: how do i upload a php script for my website?
miki86's Avatar
Extreme Talker

Posts: 185
Location: print_r($serbia);
Trades: 0
Your scipt is not written right.
Paste the code here so we can help you.
miki86 is online now
Reply With Quote
View Public Profile
 
Old 10-07-2010, 08:58 PM Re: how do i upload a php script for my website?
Novice Talker

Posts: 11
Trades: 0
This is my contact page.
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Pinlessmobile.com - Sign Up</title>
<style type="text/css">
<!--
#Layer1 {
    position:absolute;
    left:18px;
    top:735px;
    width:935px;
    height:24px;
    z-index:1;
}
.style6 {font-size: 12px}
#Layer2 {
    position:absolute;
    left:246px;
    top:269px;
    width:492px;
    height:362px;
    z-index:2;
}
.style7 {color: #0033FF}
.style8 {
    color: #666666;
    font-weight: bold;
}
.style9 {color: #000000; font-weight: bold; }
-->
</style>
<script type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_nbGroup(event, grpName) { //v6.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}
//-->
</script>
</head>

<body>
<div id="Layer1"><a href="contact.html"><img src="http://www.webmaster-talk.com/Images/Bottomborderpng.png" alt="Bird011" width="964" height="24" border="1" /></a></div>
<div id="Layer2">
  <h2 align="center" class="style7">Signup to Pinlessmobile.com<br />
  International PIN-Less Dialing</h2>
  <p class="style8">With Pin-Less Dialing (Pin Free Dialing) you will no longer have to             purchase International Phone Cards. All you have to do is register              your number with Pinlessmobile.com and recharge as you go. Within minutes              your account will be ready to make International calling using your              mobile phone. Please fill out the imformation below and a representative will contact you for sign up. </p>
 
  
  <p class="style9">Customer Imformation: </p>
  <form id="form1" name="form1" method="post" action="">
    <table width="100%" border="0" cellpadding="6">
      <tr>
        <td><div align="right">
          <label for="textfield">Email<span class="style9"> :</span></label>
        </div></td>
        <td><div align="left">
          <input name="textfield" type="text" id="textfield" size="35" maxlength="90" />
        </div></td>
      </tr>
      <tr>
        <td><div align="right">
          <label for="label">Name<span class="style9"> :</span></label>
        </div></td>
        <td><div align="left">
          <input name="textfield2" type="text" id="label" size="35" maxlength="80" />
        </div></td>
      </tr>
      <tr>
        <td><div align="right">
          <label for="label2">Phone Number<span class="style9"> :</span></label>
        </div></td>
        <td><div align="left">
          <input name="textfield3" type="text" id="label2" size="35" maxlength="12" />
        </div></td>
      </tr>
    </table>
  </form>
  <form id="form2" name="form2" method="post" action="">
    <label for="Submit"></label>
    <div align="center">
      <p>
        <input name="Submit" type="submit" class="style7" id="Submit" value="Submit" />
      </p>
    </div>
  </form>


  <p class="style9">&nbsp;</p>
</div>
<div align="center"><img src="http://www.webmaster-talk.com/Images/Topbanner.gif" width="964" height="123" border="1" align="top" /><a href="Index.html"></a>
  <table border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td><a href="index.html" target="_top" onclick="MM_nbGroup('down','group1','home','',1)" onmouseover="MM_nbGroup('over','home','','',1)" onmouseout="MM_nbGroup('out')"><img src="http://www.webmaster-talk.com/Images/homebutton.png" alt="" name="Home" width="130" height="27" border="1" id="Home" onload="" /></a></td>
      <td><a href="rates.html" target="_top" onclick="MM_nbGroup('down','group1','ratesbutton','',1)" onmouseover="MM_nbGroup('over','ratesbutton','','',1)" onmouseout="MM_nbGroup('out')"><img src="http://www.webmaster-talk.com/Images/Ratesbutton.png" alt="" name="ratesbutton" width="130" height="27" border="1" id="Ratesbutton" onload="" /></a></td>
      <td><a href="howitworks.html" target="_top" onclick="MM_nbGroup('down','group1','howitworksbutton','',1)" onmouseover="MM_nbGroup('over','howitworksbutton','','',1)" onmouseout="MM_nbGroup('out')"><img src="http://www.webmaster-talk.com/Images/howitworksbutton.png" alt="" name="howitworksbutton" width="130" height="27" border="1" id="howitworksbutton" onload="" /></a></td>
      <td><a href="contact.html" target="_top" onclick="MM_nbGroup('down','group1','Contact','',1)" onmouseover="MM_nbGroup('over','Contact','','',1)" onmouseout="MM_nbGroup('out')"><img src="http://www.webmaster-talk.com/Images/contactbutton.png" alt="" name="Contact" width="130" height="27" border="1" id="Contact" onload="" /></a></td>
    </tr>
  </table>
</div>
<table width="964" border="0" cellpadding="0" cellspacing="0">

<tr>
 
  </tr>
</table>


<div align="center">
  <p><img src="http://www.webmaster-talk.com/Images/rates_flags.jpg" alt="Bird011" width="660" height="70" /></p>
</div>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center"><span class="style6">Copyright &copy; 2010<a href="Index.html"> Pinlessmobile.com.</a> All trademarks and logos are property of their respective owners. All Rights Reserved</span>.</p>



This is the send message ending. part

<?php

 /*
 * @Web Contact Page PHP Script
 * @author [email]helpvid@ymail.com[/email] - [url]http://www.helpvid.net[/url]
 * @version 1.0.0
 * @date January  05, 2010
 * @category Helpvid PHP Script for Contact page
 * @copyright (c) 2010 @helpvid.net ([url]www.helpvid.net[/url])
 * @Creative Commons Attribution-No Derivative Works 2.0 UK: England & Wales License.
 * @Creative Commons Attribution-No Derivative Works 2.5 UK: SCOTLAND License.
 * @Creative Commons Attribution-No Derivative Works 3.0 United States License.
 */


/* Email Variables */
$emailSubject = 'contactformprocess!'; /*Make sure this matches the name of your file*/
$webMaster = 'vclass@aol.com';

/*design by Mark Leroy @ [url]http://www.helpvid.net*/[/url]

/* Data Variables */
$email = $_POST['email'];
$name = $_POST['name'];
$phone number = $_POST['comments'];
$comments = $_POST['comments'];



$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>
Comments: $comments <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);


/* Results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<title>sent message</title>
<meta http-equiv="refresh" content="3;URL=http://pinlessmobile.com/contact.html">
<style type="text/css">
<!--
body {
background-color: #444; /* You can edit this CSS to match your website*/
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 20px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #fec001;
text-decoration: none;
padding-top: 200px;
margin-left: 150px;
width: 800px;
}
-->
</style>
</head>
<div align="center">Thank You for contacting us. A Local Sales Representative will contact you. You will return to pinlessmobile.com</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>

Last edited by chrishirst; 10-17-2010 at 03:49 PM..
vclass is offline
Reply With Quote
View Public Profile
 
Old 10-07-2010, 09:39 PM Re: how do i upload a php script for my website?
Novice Talker

Posts: 11
Trades: 0
These codes dont have the display code for spam and the invalid fields like if someone puts incorrect email address. like if i find a good script what are the steps to install it??
vclass is offline
Reply With Quote
View Public Profile
 
Old 10-07-2010, 10:51 PM Re: how do i upload a php script for my website?
Novice Talker

Posts: 11
Trades: 0
ok i just install a mailer script that go daddy provided its working the only thing is how can i put a code where if someone puts a invalid email address or phone number and puts hot links on it. where can i find the code for that? lol its funny cause when i click submit without filling out the form, im receiving it!!!!
vclass is offline
Reply With Quote
View Public Profile
 
Old 10-08-2010, 01:19 AM Re: how do i upload a php script for my website?
Novice Talker

Posts: 11
Trades: 0
ok i used godaddy.com mailer script but i wanted to add a drop down menu i just want to check if it works? because i did it and the email came as just : submit (no other imformation what there, so it didnt work. how can i edit this code for it to work??

HTML Code:
<p class="style9">Customer Imformation: </p>
  <form action="/gdform.php" method="post">
<input type="hidden" name="subject" value="Form Submission" />
<input type="hidden" name="redirect" value="index.html" />
<p>First Name:<input type="text" name="FirstName" /></p>
<p>Last Name:<input type="text" name="LastName" /></p>
<p>E-Mail:<input type="text" name="email" /></p>
<p>PhoneNumber:<input type="text" name="PhoneNumber" /></p>
<p>How did you hear from us:<select name="ListValue" /></p>
  <option></option>
  <option>craigslist.com</option>
  <option>ebay.com</option>
  <option>Google.com</option>
  <option>Newspaper</option>
  <option>Other</option>
</select>
<p>Comments:<textarea name="comments" cols="40" rows="10">
Type comments here.</textarea></p>
<input type="submit" name="submit" value="submit"/>
</form>

Last edited by chrishirst; 10-17-2010 at 03:48 PM..
vclass is offline
Reply With Quote
View Public Profile
 
Old 10-08-2010, 03:11 AM Re: how do i upload a php script for my website?
miki86's Avatar
Extreme Talker

Posts: 185
Location: print_r($serbia);
Trades: 0
I meant paste the php code not the whole thing

Valid email check:
PHP Code:
if((isset($_POST['email'])) || (!empty($_POST['email']))) {    
        if((
preg_match("/^[a-zA-Z]\w+(\.\w+)*\@\w+(\.[0-9a-zA-Z]+)*\.[a-zA-Z]{2,4}$/"$_POST['email']) === 0)) {
            echo 
'Email NOT valid'
        }

miki86 is online now
Reply With Quote
View Public Profile
 
Old 10-09-2010, 11:32 AM Re: how do i upload a php script for my website?
Novice Talker

Posts: 11
Trades: 0
is there a code where i can put for people who cant spam it? and leaving hotlinks ?
vclass is offline
Reply With Quote
View Public Profile
 
Old 10-09-2010, 12:13 PM Re: how do i upload a php script for my website?
Novice Talker

Posts: 11
Trades: 0
i put the code in and it doesnt work
vclass is offline
Reply With Quote
View Public Profile
 
Old 10-09-2010, 12:18 PM Re: how do i upload a php script for my website?
miki86's Avatar
Extreme Talker

Posts: 185
Location: print_r($serbia);
Trades: 0
Of course it doesn't, i gave you an example, you need to edit it.
miki86 is online now
Reply With Quote
View Public Profile
 
Old 10-09-2010, 01:36 PM Re: how do i upload a php script for my website?
Novice Talker

Posts: 11
Trades: 0
is this the code? for non-spaming? like how do i edit this into my current php script??

Current php script:

PHP Code:
<?php
    $request_method 
$_SERVER["REQUEST_METHOD"];
    if(
$request_method == "GET"){
      
$query_vars $_GET;
    } elseif (
$request_method == "POST"){
      
$query_vars $_POST;
    }
    
reset($query_vars);
    
$t date("U");
    
$file $_SERVER['DOCUMENT_ROOT'] . "/../data/gdform_" $t;
    
$fp fopen($file,"w");
    while (list (
$key$val) = each ($query_vars)) {
     
fputs($fp,"<GDFORM_VARIABLE NAME=$key START>\n");
     
fputs($fp,"$val\n");
     
fputs($fp,"<GDFORM_VARIABLE NAME=$key END>\n");
     if (
$key == "redirect") { $landing_page $val;}
    }
    
fclose($fp);
    if (
$landing_page != ""){
 
header("Location: [URL]http://".$_SERVER["HTTP_HOST"]."/$landing_page[/URL]");
    } else {
 
header("Location: [URL]http://".$_SERVER["HTTP_HOST"]."/[/URL]");
    }
non spaming script:
HTML Code:
<html>
<body>
<?php
function spamcheck($field)
  {
  //filter_var() sanitizes the e-mail
  //address using FILTER_SANITIZE_EMAIL
  $field=filter_var($field, FILTER_SANITIZE_EMAIL);
  //filter_var() validates the e-mail
  //address using FILTER_VALIDATE_EMAIL
  if(filter_var($field, FILTER_VALIDATE_EMAIL))
    {
    return TRUE;
    }
  else
    {
    return FALSE;
    }
  }
if (isset($_REQUEST['email']))
  {//if "email" is filled out, proceed
  //check if the email address is invalid
  $mailcheck = spamcheck($_REQUEST['email']);
  if ($mailcheck==FALSE)
    {
    echo "Invalid input";
    }
  else
    {//send email
    $email = $_REQUEST['email'] ;
    $subject = $_REQUEST['subject'] ;
    $message = $_REQUEST['message'] ;
    mail("[EMAIL="someone@example.com"]someone@example.com[/EMAIL]", "Subject: $subject",
    $message, "From: $email" );
    echo "Thank you for using our mail form";
    }
  }
else
  {//if "email" is not filled out, display the form
  echo "<form method='post' action='mailform.php'>
  Email: <input name='email' type='text' /><br />
  Subject: <input name='subject' type='text' /><br />
  Message:<br />
  <textarea name='message' rows='15' cols='40'>
  </textarea><br />
  <input type='submit' />
  </form>";
  }
?>
</body>
</html>

Last edited by chrishirst; 10-17-2010 at 03:50 PM..
vclass is offline
Reply With Quote
View Public Profile
 
Old 10-09-2010, 06:11 PM Re: how do i upload a php script for my website?
Banned

Posts: 3
Name: anja
Trades: 0
Thanks for your codes. I will try it now.
novoline is offline
Reply With Quote
View Public Profile Visit novoline's homepage!
 
Old 10-11-2010, 06:32 PM Re: how do i upload a php script for my website?
Novice Talker

Posts: 11
Trades: 0
hey i was able to add recapcha on my web form. but when i click submit with out filling out the form and recapcha. it still submits. how do i fix this??
vclass is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to how do i upload a php script for my website?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.51544 seconds with 12 queries