Help Creating a User Input


Looking for some help as i got half way but my PHP skills are still in the learning phase. This is the code i have already just need a for my user to place so this code and perform the function. Sorry if I’m explaining it wrong, any help will be great!

$con = mysqli_connect("localhost","xxx","xxx","xxx");
    $nommyidsql = mysqli_query($con, "SELECT * FROM nommyid WHERE profile_id = '".$_SESSION['user_id']."'");
    $nommyidcount = mysqli_num_rows($nommyidsql);
    if($nommyidcount > 0)
        mysqli_query($con,"UPDATE nommyid SET deviceid='".$_POST['deviceid']."', url_point='".sprintf($this->language->link->header->header, $data->link->url)."' WHERE profile_id='".$_SESSION['user_id']."'");
        mysqli_query($con,"INSERT into nommyid SET deviceid='".$_POST['deviceid']."', url='', url_point='".sprintf($this->language->link->header->header, $data->link->url)."', profile_id='".$_SESSION['user_id']."', notes=''");
$nommyidsql1 = mysqli_query($con, "SELECT * FROM nommyid WHERE profile_id = '".$_SESSION['user_id']."'");
$nommyidcount1 = mysqli_num_rows($nommyidsql1);
if($nommyidcount1 > 0)
    $nommyiddata1 = mysqli_fetch_array($nommyidsql1);

<input type="text" id="updatedevice" name="description" class="form-control" value="<?= NEED SOMETHING HERE I THINK ?>" />

I maybe trying to do this but think i could be wrong

Please start by explaining what you are TRYING TO DO first… then maybe we can help.

Your initial desc is lacking any real info.

You are trying to PRE-POPULATE input fields… is that it?

Sponsor our Newsletter | Privacy Policy | Terms of Service