Post
Topic
Board Project Development
Re: PHP Coding question in regards to validat user input before passing it into mysq
by
retteDenTierpark
on 11/12/2019, 00:36:08 UTC
it says at least 5 times that i use php and mysql and also the $ sign says that i use php

anyways

where in the submit.php file do i need to write all of that?

my submit.php
is this

include_once 'db.php';

$eth = mysqli_real_escape_string($conn,$_POST['address']);


$sql = "INSERT INTO address(address) VALUES('$eth');";
mysqli_query($conn, $sql);


so where goes the checkAddress function?

and why should i echo out anything in the submit.php file

i need to echo that out on the container.php file since this has all the html

isnt there a better way to do this cause if i put it in the submit.php i need to go back and forth and if valid is invalid i need to let them know on the cointainer.php file


Why is this so compliated to validate a simple address?
thats all i need


user inputs bitcoin address- i check if its valid - if it is valid user gets redirected to a success message and address goes into a databse

if invalid user gets a message that input is invalid

this is supposed to be simple