[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


On form submit, I get prompted to download the PHP file

Posted on 2008-06-23
Medium Priority
Last Modified: 2008-06-23
I tried to do this tutorial: http://www.phpriot.com/articles/complete-prototype-example and whenever I submit the page, I get prompted to download the php file that's triggered for the submit action. PHP is properly installed, the database is receiving the data.
Question by:troubledFish
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 13

Expert Comment

ID: 21851863
hmm where do you have your js files located?
LVL 13

Accepted Solution

compfixer101 earned 2000 total points
ID: 21851952
change this on the index.html page

<script type="text/javascript" src="/js/prototype.js"></script>
<script type="text/javascript" src="/js/Application.js"></script>
<script type="text/javascript" src="/js/AddressBook/Creator.js"></script>
<script type="text/javascript" src="/js/AddressBook/Contacts.js"></script>
*****************CHANGE TO******************
<script type="text/javascript" src="/js/prototype.js"></script>
<script type="text/javascript" src="/js/Application.js"></script>
<script type="text/javascript" src="/js/Creator.js"></script>
<script type="text/javascript" src="/js/Contacts.js"></script>

Open in new window


Author Comment

ID: 21852019
hm I didn't notice my paths were wrong, thank you. but that didn't solve the issue. I even went so far as to place the files so they are in there proper locations, still didn't work. Here's whats odd:

If I have the path src="/js/<file>" I can submit properly and the database gets updated correctly. If I remove the slash src="js/<file>"  then I can see the existing database entries, but the form will no longer update the database.


Author Comment

ID: 21852035
Figured it out, I made just changed the action path from absolute to relative.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question