Jump to content

Html To Php Code Help


phpjayx

Recommended Posts

So I have a logon page php page, which I'm attempting to send other data over to after it does its look up in the database for the user... My debugger shows the data is correctly extracted from my database but I cant get the SUBMIT to work to send over the 'message1'...... Is there anything here that I'm doing completely wrong?

Thanks in advance

 

 

 

HTML CODE.......................

 

 

 

<form action="other_view.php" method="post" id="form_submit">

<input name="userid" class="invinsible" id="userid_submit" >

<input name="message1" class="invinsible" id="message1_submit" >

 

<input value="Go to other view" type="button" onclick="onclickSubmit();" >

</form>

 

 

 

 

PHP CODE............................

 

 

function onclickSubmit()

{

var userId = parseInt(document.getElementById('userId').innerHTML);

var MSG1 = document.getElementById('mainmessage').innerHTML;

 

 

if (userId == '0')

{

alert('Please log in');

}

else

{

document.getElementById('userid_submit').value = userId;

document.getElementById('message1_submit').value = MSG1;

 

}

}

Link to comment
https://forums.phpfreaks.com/topic/272266-html-to-php-code-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.