How to store html label as a php variable? -
i've done bit of research , seems haven't found answer anywhere. i'm wondering how store html label variable. have label set in html , store variable in php storing again mysql database.
i tried setting variable html name hoping pick somehow.
//define variables , set empty values $adtitle = $email = $price = $message = $category = $studname = ""; //connecting database , table $con = mysqli_connect($host,$username,$password,$db_name); if($con->connect_errno > 0){ die('unable connect database [' . $con->connect_error . ']'); } //get values form, check whether or not values have been entered before submitting if(isset($_post['ad'])){ $adtitle = $_post['ad']; } if(isset($_post['email'])){ $email = $_post['email']; } if(isset($_post['price'])){ $price = $_post['price']; } { $studname= $_post['myadvertlabel']; }
'studname' name of variable , myadvertlabel label i'm trying store.
have no idea do. link or reference highly appreciated. thanks
Comments
Post a Comment