I'm getting an undefined variable when trying to execute my code, the entry gets made in mysql but there is no data being inserted, obviously because of the undefined variable.
It was working...
Here's the message:
PHP Notice: Undefined variable: title in /Applications/MAMP/htdocs/rfx/wp-content/plugins/rfx-manager/inc/rfi_page.php on line 154
Here is the code:
<?php
$wpdb->query("insert into ".$wpdb->prefix."forms set user_id=".$user_id.",
title='".$title."');
$title=$result->title;
?>
<form method="post" enctype="multipart/form-data" role="form">
<label for="title"><b>Enter title here:</b></label>
<br>
<input type="text" name="title" class="large-text" value="<?php echo (isset($title) ? $title : '') ?>" placeholder="Enter title">
<input class="button-primary" type="submit" name="submit" value="<?php _e( 'Submit RFI for approval' ); ?>" />
</form>