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'; }

28th Feb 2017, 3:04 AM
フェăƒȘăƒŒ
フェăƒȘăƒŒ - avatar
4 RĂ©ponses
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>
28th Feb 2017, 6:33 AM
Michael Szczepanski
Michael Szczepanski - avatar
0
ive try, and the message "Call to undefined function getElementById"
28th Feb 2017, 7:36 AM
フェăƒȘăƒŒ
フェăƒȘăƒŒ - avatar
0
there may be a php specific function that allows this to happen. :/ I've used php like once. sorry man.
28th Feb 2017, 4:51 PM
Michael Szczepanski
Michael Szczepanski - avatar
0
please, explain it.
2nd Mar 2017, 8:12 AM
フェăƒȘăƒŒ
フェăƒȘăƒŒ - avatar