Search found 15 matches

by penpaper
Fri Jun 02, 2006 11:36 am
Forum: Javascript
Topic: JavaScript counts characters in Textarea
Replies: 2
Views: 645

JavaScript counts characters in Textarea

The following code is used to count the number of characters typed into a textarea and count down from the 480 maximum allowed characters. The form where the textarea appears is posted to a confirmation page. There is a submit button and an edit button on the confirmation page. When the user chooses...
by penpaper
Thu Jun 01, 2006 6:09 pm
Forum: PHP - Code
Topic: Escaped apostrophe in the email
Replies: 11
Views: 917

I removed all my coding regarding stripslashes and ltrim and htmlspecialchars from the top fo the email function and ran thru. the resulting email had NO message at all. So, I put your coding at the top of the email function. I read about nesting function calls but now really understand. Here is wha...
by penpaper
Thu Jun 01, 2006 5:10 pm
Forum: PHP - Code
Topic: Escaped apostrophe in the email
Replies: 11
Views: 917

Yes! on the regular pages where I'm printing or echoing to screen it works GREAT. However, when I put $msg .= "Message or Ad Text: \t stripslashes($message) \n\n"; In the email function (1) it didn't work and (2) the code showed up like this - Message or Ad Text: stripslashes(I\'ve added t...
by penpaper
Thu Jun 01, 2006 3:55 pm
Forum: PHP - Code
Topic: Escaped apostrophe in the email
Replies: 11
Views: 917

I cut and pasted your code to the top of the form that receives the variables with the folowing result: This is the message straight from the form... I\'ve added the recommended code to the top of the confirm form and the function called by the confirm form. Here\'s hoping that this time there\'s a ...
by penpaper
Thu Jun 01, 2006 2:42 pm
Forum: PHP - Code
Topic: Escaped apostrophe in the email
Replies: 11
Views: 917

We checked yesterday and the magic_quotes_gcp is ON. I added code to the file that calls the email function as follows: echo "I'm going to echo the message text without stripslashes here <br />"; echo $message; echo '<br />'; echo "Now I'll echo the same thing with the stripslashes <b...
by penpaper
Thu Jun 01, 2006 1:41 pm
Forum: PHP - Code
Topic: Escaped apostrophe in the email
Replies: 11
Views: 917

the email that is generated by the code has backslashes excaping any apostrophes

ie: "Mary\'s brown coat\'s button\'s " The stripslashes do no good at all.

I'll use php tags rather than code tags in the future.

penpaper
by penpaper
Thu Jun 01, 2006 11:54 am
Forum: PHP - Code
Topic: Escaped apostrophe in the email
Replies: 11
Views: 917

Escaped apostrophe in the email

I am still having trouble with the apostrophes being escaped in the email. We've managed to get rid of the excape everywhere else but in the email. Here's the code. function email($ad, $orderNo, $orderTot, $firstName, $lastName, $address1, $address2, $city, $state, $zip, $telephone, $cemail, $where,...
by penpaper
Thu Jun 01, 2006 11:49 am
Forum: PHP - Code
Topic: ltrim() and stripslashes() are not consistent
Replies: 5
Views: 331

OK! I figured it out. I had spaces in my coding again. I now know about spaces in coding. A valuable lesson that came to me way too slowly. Thank you for your patients.

lauren
by penpaper
Wed May 31, 2006 12:49 pm
Forum: PHP - Code
Topic: ltrim() and stripslashes() are not consistent
Replies: 5
Views: 331

leading spaces & escaped apostrophes

Thanks for pointing out the spaces in the code. They are gone now. The code used for the textarea in the file that the user posts to an email: <strong><div style="margin-right: 150px"><? $message=ltrim($message); $message=htmlspecialchars($message, ENT_QUOTES); print stripslashes($message)...
by penpaper
Sat May 27, 2006 1:39 pm
Forum: PHP - Code
Topic: Passing variables with Post & if elseif statements
Replies: 2
Views: 309

Thanks loads! I'll give it a try. lauren
by penpaper
Sat May 27, 2006 12:22 pm
Forum: PHP - Code
Topic: question about form processing script
Replies: 16
Views: 1014

type

Did you find that you have a typo in the line

Code: Select all

if (empty($phone) || empty($email) || empty($dcotors_name) || empty($practice_name)) {
doctors is spelled dcotors :?
by penpaper
Sat May 27, 2006 12:03 pm
Forum: PHP - Code
Topic: Passing variables with Post & if elseif statements
Replies: 2
Views: 309

Passing variables with Post & if elseif statements

I created a form where user could provide info for a notice to be posted on local cable TV community channel. When the form is completed the Submit button posted the variables to a page where all user input was shown for the user to verify. When it first was uploaded, the user could use the back but...
by penpaper
Thu May 25, 2006 12:11 pm
Forum: PHP - Code
Topic: Popup, select a date, calendar in javascript in PHP page
Replies: 5
Views: 919

Thanks all for the assist. Kimber found another popup that doesn't use the FORM tag and it works just great.
by penpaper
Wed May 24, 2006 7:19 am
Forum: PHP - Code
Topic: Popup, select a date, calendar in javascript in PHP page
Replies: 5
Views: 919

Changed file names

I changed calendar.js to calendar_js.php and added calendar_js.php to my includes in the file that has the Form Tag in it I changed calendar_body.html to calendar_body.php I changed calendar.html to calendar.php I used Extended Replace to change references within the files to the new file names. I u...
by penpaper
Tue May 23, 2006 7:13 pm
Forum: PHP - Code
Topic: Popup, select a date, calendar in javascript in PHP page
Replies: 5
Views: 919

Popup, select a date, calendar in javascript in PHP page

A free javascript pop up calendar script. Similar to those used by the airlines, etc. works fine when the following code is on an .html page but won't work at all when I put it in a .php page <form name="foo"> <input type="text" name="bar" /> <a href="#" oncli...