Answers for "php post form data"

PHP
1

save post data to file php

file_put_contents('test.txt', file_get_contents('php://input'));
Posted by: Guest on September-25-2020
0

post form data

@if($errors->any())                           /*  This 
@foreach($errors->all() as $error)                area is 
  {{ $error }}<br>                                to print
@endforeach                                       message in
@endif                                            the form     */
<form method="post" action="submitmyform">	
       {{ csrf_field()}}               // csrf token
	<p>
		<label>Name</label>
		<input type="text" name="name" value="{{ old("name")}}"/>
	</p>
     <p>
     <label>Email</label>
		<input type="text" name="email" value="{{ old("email")}}"/>	
     </p>
	<p>
     <label>Age</label>
		<input type="text" name="age" value="{{ old("age")}}"/>	
     </p>
      <p>
      	<input type="submit" name="Submit">
      </p>
</form>
Posted by: Guest on May-25-2021

Browse Popular Code Answers by Language