
shawnm
Members-
Posts
10 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
shawnm's Achievements

Newbie (1/5)
0
Reputation
-
Hey guys, I'm trying to figure out how I can get the word count of an uploaded document with .doc or .docx extensions. Getting .rtf and .txt works fine but the .doc and .docx aren't so easy. Basically the website is being designed to spit out a word count of an uploaded document, multiply that by a price per word fee and give the client a quotation based on word count. I don't want clients having to copy and paste text into boxes on the site in order to achieve this. Any ideas on how I can acheive this, directly or indirectly? Any help on this would be GREATLY appreciated as I've been racking my brain trying to figure this one out. Thanks!
-
I don't know how to set my own location. All I was doing is posting the codes people have been recommending in the places that they recommended. I'm not overly PHP savvy...
-
Hey guys, I've been getting tons of advice on sessions and I really appreciate it. I checked for errors with my sessions and the following is what I get: Warning: session_start() [function.session-start]: open(/var/php_sessions/sess_5cc8b9a83090b30febf2d9d15e1461e6, O_RDWR) failed: No such file or directory (2) in /hermes/bosweb/web054/b545/sl.luckyelf/public_html/enter.php on line 4 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /hermes/bosweb/web054/b545/sl.luckyelf/public_html/enter.php:4) in /hermes/bosweb/web054/b545/sl.luckyelf/public_html/enter.php on line 4 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /hermes/bosweb/web054/b545/sl.luckyelf/public_html/enter.php:4) in /hermes/bosweb/web054/b545/sl.luckyelf/public_html/enter.php on line 4 Can anybody explain these errors and tell me how I can fix them? Thanks again everyone. Shawn
-
I'm still battling with php sessions. Below is what was kindly recommended by someone in this forum and it is what I have done, changing the form variables and .php page names to match my own: page1.php Code: <form action="page2.php" method="post"> <p>Name:</p><input type="text" name="name" /> <input type="submit" value="Proceed to next page" /> </form> page2.php Code: <?php session_start(); $_SESSION['name'] = $_POST['name']; ?> <form action="page3.php" method="post"> <p>Age:</p><input type="text" name="age" /> <input type="submit" value="Proceed to next page" /> </form> page3.php Code: <?php session_start(); $_SESSION['age'] = $_POST['age']; ?> <form action="final.php" method="post"> <p>Profession:</p><input type="text" name="pro" /> <input type="submit" value="Send mail" /> </form> final.php Code: <?php session_start(); $name = $_SESSION['name']; $age = $_SESSION['age']; $pro = $_POST['pro']; //send mail containing above info, using mail() or whatever you prefer ?> <p>Mail send successfully!</p> First question: is the php code (session_start(); etc.) supposed to go at the beginning of the source code? Or should it be embedded in the form? Secondly, I cannot for the life of me get the sessions to work. No matter what I do, the only info that gets eventually sent to my email is that which is taken from the third form (third page, one form per page). The info from the other two forms cannot seem to carry through. Can anybody shed some light on this? Thanks yet again. Cheers, Shawn
-
I will pay someone to help me with PHP! i'm that desperate.
shawnm posted a topic in PHP Coding Help
Hey guys, Well, I've taken everyone's suggestions on how to use sessions and the like and I've had zero success. What I want to be able to do is have customers enter information on three forms on three different pages. On the last page, when they click submit, I want the info from all three pages sent to me in a single email. The info entered is different on each page/each form. I think I've discovered that I'm simply php stupid. If somebody can spell out for me exactly what I have to do (form names, coding, etc.) and I can get it to work I will pay them $25. No joke. I'll transfer if to a paypal account. I have a deadline for this website and am desperate. Thanks. Shawn -
I've tried two different approaches (below) to solve the problem of taking data entered in multiple forms on muliple pages and having it sent to me in a single email. approach 1: <?php while (list($name, $value) = each($HTTP_POST_VARS)) { echo "<input type=\"hidden\" value=\"$value\" name=\"$name\">\n"; } ?> Approach 2: session_start(); if(!$_SESSION['ses_request']){$_SESSION['ses_request'] = $_REQUEST;}else{$_SESSION['ses_request'] = array_merge($_SESSION['ses_request'],$_REQUEST);} I entered code where I've read i'm supposed to but it doesn't work. The only info that is forwarded to my email is that which i enter in the last form on the last page before clicking the 'submit' button and posting the info. The data from the other forms won't carry over. Any advice or suggestions? Thanks. Shawn
-
I've checked with my hosting company and everything is fine there. They think there has to be something wrong with my code. Can anybody help? thanks
-
Ok so I tried combining some variables as follows but it still doesn't work: <? $ForwardTo="[email protected]"; $card=$_REQUEST['cardbutton']; $myclue=$_REQUEST['myclue']; $mymessage=$_REQUEST['mymessage']; $name=$_REQUEST['name']; $address1=$_REQUEST['address1']; $address2=$_REQUEST['address2']; $address3=$_REQUEST['address3']; $city=$_REQUEST['city']; $state=$_REQUEST['state']; $zipcode=$_REQUEST['zipcode']; $subject = "New order for $name"; $mailmessage = "$card $myclue $mymessage $name $address1 $address2 $address3 $city $state $zipcode"; mail($ForwardTo, $subject, $mailmessage); header("Location: ThankYou.html"); ?> Any suggestions??? Thanks
-
Ah I see. How can I fix this?
-
Hey Everyone, I was hoping someone could help me out with a little PHP problem. Like many posters, I'm new to the PHP game. What I'm trying to accomplish is to gather information on 3 different forms spread across 3 pages, then process all of the info together and send it as an email to my email address. What I've done so far is linked the 3 pages, making the action on form1 to post to page2.php, etc. On the second and third pages (containing the second and third forms) I've included the following code: session_start(); if(!$_SESSION['ses_request']){$_SESSION['ses_request'] = $_REQUEST;}else{$_SESSION['ses_request'] = array_merge($_SESSION['ses_request'],$_REQUEST);} My submit button on the third form is set to POST to sendmail.php. I've copied the code in the sendmail.php file below: <? $ForwardTo="[email protected]"; $card=$_REQUEST['cardbutton']; $myclue=$_REQUEST['myclue']; $mymessage=$_REQUEST['mymessage']; $name=$_REQUEST['name']; $address1=$_REQUEST['address1']; $address2=$_REQUEST['address2']; $address3=$_REQUEST['address3']; $city=$_REQUEST['city']; $state=$_REQUEST['state']; $zipcode=$_REQUEST['zipcode']; mail($ForwardTo, "New Order from $name",$card, $myclue, $mymessage, $name, $address1, $address2, $address3, $city, $state, $zipcode); header("Location: ThankYou.html"); ?> When I go to the site and fill out the form everything seems to work fine. The Thank You page even comes up fine, but I don't receive an email with the info. Cah anybody help with this?? Thank you in advance. Shawn