0
why im cannt change this echo to innerHTML? the output unexpected '='
if(pm_count=='50'){ $error='The user you are trying to send a message to has 50 private messages, sorry but we cant send your message untill that user deletes some of their messages.'; }else{ mysql_query("INSERT INTO messages(reciever,sender,subject,message) VALUES('$reciever', '$user','$subject', '$message')") or die(mysql_error()); $pm_count++; mysql_query("UPDATE fb_users SET pm_count='$pm_count' WHERE username='$reciever'"); } echo"<p><b>You have successfully sent a private message!</b></p><br>"; } else{ $error = 'You must wait 15 seconds before sending another private message'; }
4 ответов
0
is it echo("")?
I know for javascript you need to retrieve the elemnt and change it to what you want. **assuming u want it to appear on the page..
js:
<b><p id="myId"></p></b><br>
document.getElementById("myId").innerHTML = "The message you wish to add";
will now be:
<b><p id="myId">The message you wish to add</p></b><br>
0
ive try, and the message "Call to undefined function getElementById"
0
there may be a php specific function that allows this to happen. :/ I've used php like once. sorry man.
0
please, explain it.