if statements, php and sql - tricky stuff
Can anyone help with this? I've re-done it too many times and just get
stuck. It's most likely easier NOT showing any of my coding attempts.
1. If database table (tbl_profiles) value exists, output form that lets
user UPDATE the information.
2. If database table (tbl_profiles) value does not exist, output form to
let user ADD profile information.
The form should submit to itself and be something like this:
<form action='../edit/index.php' method='post' name='add'>
Profile Text:<br />
<textarea name='profileText' id='comments'>
</textarea><br />
<input type='submit' value='Submit' />
</form>
The 'profileText' should be place into tbl_profiles where user_id = $who
by either adding it as a new entry if it doesnt already exist, or altering
the current entry if it is there.
Please help.
No comments:
Post a Comment