Please can somebody give me a bit of help with this. I have got it working on my Localhost, but when I uploaded it to my Hosting Company I get this error message:
"Warning: Supplied argument is not a valid MySQL result resource"
<?php
session_start();
include("common.php");
include("db.php");
if(session_is_registered("SESSION"))
{
echo "You are logged in as: $SESSION[valid_user] and $SESSION[valid_userID]";
}
else
{
header("Location: log_in.php");
}
dbConnect('db65954193');
mysql_select_db("db65954193");
$sql = "SELECT history, type_music FROM ceolweb_details WHERE valid_userID = $SESSION[valid_userID]";
$result = mysql_query($sql);
$myrow = mysql_fetch_array($result);
if (!isset($submit)):
?>
<html>
</html>
<form action="details.php" method="POST" name="details" id="details">
<table>
<tr>
<td>
<textarea name="history" cols="50" rows="5" id="history"><?php echo $myrow["history"] ?></textarea>
</td>
</tr>
<tr>
<td>
<textarea name="type_music'" cols="50" rows="5" id="type_music'"><?php echo $myrow["type_music'"] ?></textarea>
</td>
</tr>
<tr>
<td>
<input name="submit" type="submit" id="submit" value="Submit">
</td>
</tr>
</table>
</form>
<?php
else:
dbConnect('db65954193');
mysql_select_db("db65954193");
$sql = "UPDATE ceolweb_details SET
history = '$history',
type_music = '$type_music'
where valid_userID = '$valid_userID'";
if (!mysql_query($sql))
error("A error occurred in processing your ".
"submission.\nIf this error persists, please ".
"contact contact@ceolweb.com");
?>
<?php
endif;
?>