Jump to content

[SOLVED] problem with HTML/PHP form on Apache


aldm

Recommended Posts

Hi,

I have Apache server installed on my computer and I'm learning PHP. I have a HTML form with following code:

<html>

<head>

  <title>Forma</title>

</head>

<body>

<form action="F:\xampp\htdocs\phpinfo.php" method="POST">

<br>Unesite tekst:

<br><input type="text" name="podatak" value="">

<br><input type="submit" name="submit" value="Posalji">

</form>

</body>

</html>

Code of phpinfo.php file:

<?php

phpinfo();

?>

When I click on "Posalji" button, firefox gives me next alert:

Firefox doesn't know how to open this address, because the protocol (f) isn't associated with any program.

Has anyone idea how could I solve this problem?

Thanks in advance :D

Link to comment
Share on other sites

When I change path ("F:\xampp\htdocs\phpinfo.php") to "phpinfo" and click on "Posalji" button, I get  blank page. I also changed phpinfo.php file to:

<?php

echo 'Something';

?>

but with no result (still, there is a blank page when I click on button)

Link to comment
Share on other sites

I save both files (forma.html and phpinfo.php) in F:\xampp\htdocs and action is "phpinfo.php".

When I type localhost/phpinfo.php in my browser, it works, but with click on button, it doesn't works. It shows me

a blank page with adress: file:///F:/xampp/htdocs/phpinfo.php

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.