Click to See Complete Forum and Search --> : problem posting php page


gregorykoenig
09-16-2008, 04:39 PM
Hello to all, the dreaded newbie is here

I am having a problem invoking my php page from my html page. What I have in my html code is this block:

<form action="http://192.168.0.10/~Greg/homework2/homework2.php" mehtod="POST">

<textarea rows="10" cols="30" name="input"></textarea>

<br />

<input type="submit" value="Translate...">

</form>

when i submit my info, it is not giving me a new page. Here is the php code.

<?php

echo "<html>\n

<head>\n

<title>Translation, first reading frame</title>

</head>\n" ;



echo "<body>" ;

echo "<h1><b>Amino acid translation, frame 1</h1>" ;



?>

Note: Ignore the contents, this is the beginnings of an assignment

When the new page comes up, it is only showing the code for php; not rendering the appropriate html page. I am not sure what is the issue. I have php installed on my mac and my server is working.

Any help would be great.

kredd
09-16-2008, 08:23 PM
so you're saying php isn't being parsed? have you tried

<?php echo phpinfo(); ?>

just to make sure things are cool behind the scenes? can you get other php pages to work correctly? i copied your php page content and it printed to my browser just fine. so it seems your code is fine, must be something to do with php itself?

also, have you just tried viewing the new page by itself without having submitted to it?

dataline
09-16-2008, 08:58 PM
not sure if this is the problem, but I noticed a typo (mehtod instead of method) in your HTML code:

<form action="http://192.168.0.10/~Greg/homework2/homework2.php" mehtod="POST">

gregorykoenig
09-17-2008, 01:55 PM
As to the issue with spelling, I changed it to "method" and still got the same result. I think my issue may be with my Apache. I spoke with someone that said I need to install the php module, but they or I are unsure how to go about this. If this is the issue or something else please respond.

aj_nsc
09-17-2008, 03:11 PM
It is the php module issue. Here's how to do it (assuming you are running apache on windows):

http://www.ricocheting.com/server/php.html

gregorykoenig
09-17-2008, 04:58 PM
im working on a Mac OSX platform. Is this an issue?

gregorykoenig
09-18-2008, 12:28 PM
How do I go about activating the module in Mac OSX? The link provided is for a Windows based machine. Is it a similar process?