DareDevil DareDevil - 2 years ago 118
PHP Question

how to add PHP Path

I am new to php and currently I am facing an issue , I have a directory in root folder of server say "MyFiles" and all db functions and code files in it.
I have another folder inside "MyFiles\Forms" in this folder I have html form code and upon button submit I am calling a php file which is located in directory "MyFiles" , when I am running app its says document not found.
below is the structure,







In "register_me.php" I am calling "register.php" .

below is the code


<form method="post" action="./Register.php">

First Name: <input type="text" name="FirstName" value='<?php if(isset($_POST['FirstName'])) {echo $_post['FirstName']; }?>' >
Last Name: <input type="text" name="LastName" value='<?php if(isset($_POST['LastName'])) {echo $_post['LastName']; }?>' >
Password: <input type="password" name="Password" value='<?php if(isset($_POST['Password'])) {echo $_post['Password']; }?>' >
Email: <input type="email" name="Email" value='<?php if(isset($_POST['Email'])) {echo $_post['Email']; }?>' >
Device ID: <input type="number_format" name="DeviceID" value='<?php if(isset($_POST['DeviceID'])) {echo $_post['DeviceID']; }?>' >
Phone No: <input type="number_format" name="PhoneNumber" value='<?php if(isset($_POST['PhoneNumber'])) {echo $_post['PhoneNumber']; }?>' >
Active: <input type="number_format" name="IsDeleted" value='<?php if(isset($_POST['IsDeleted'])) {echo $_post['IsDeleted']; }?>' >
<input type="submit" name="register" value="Register">

Answer Source

Try this

<form method="post" action="../register.php">
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download