Jump to content

Recommended Posts

Posted

I have a PHP script for my news page, which saves the value of a textarea to a text file, then another script on the shtml page displays the news using the php echo command. The script for saving the input works like a charm, but the echoing on the shtml page is a dud. I can't just switch the extension to .php because I have a javascript on the page that prompts the user for a password if they want to post news, which isn't supported on a php page. I tried editing the .htaccess file, and that didn't work, either. Sorry if this is hard to read, I posted this on about 0 sleep with a migraine.

Posted

The .shtml extension is for SSI (Server Side Includes). Sorta like cgi/perl. html and javascript should work fine on a page with a .php extension. Just write the html and javascript like you normally would on a page with a .html extension except use the .php extension.

 

Posted

That's what I've been trying to do, but when I change it to .php, the JS doesn't work. I got a new password system, that works with .php, so I'm fine now. Oh, and sorry for the double-post. The forum didn't let me post the first topic, but apparently it did :o

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...