I am working for a QA forum. I have a question and searched for that but did not find any better solution. In the login system, I am getting redirect_to URL like-
http://localhost:8081/qa/506/how-to-connect-the-html-page-to-the-mysql-database-using-php#ans123
This is what I will use after login. I know, I can use
<a name="ans123"></a>
to jump section or by id .
I am Getting value from the URL like -
login.php?redirect_to=http://localhost:8081/qa/506/how-to-connect-the-html-page-to-the-mysql-database-using-php#ans123
redirect_to=$_GET['redirect_to'];
but it gives me only http://localhost:8081/qa/506/how-to-connect-the-html-page-to-the-mysql-database-using-php
not
http://localhost:8081/qa/506/how-to-connect-the-html-page-to-the-mysql-database-using-php#ans123
with #ans123 .
I want to jump the user to textarea after login on to the question page.
I have a textarea in then bottom with name="textarea"
<a name="ans123"> </a>
<form action="#" method="POST">
<textarea name="anscontent" required></textarea>
<script>
CKEDITOR.replace("anscontent", {
height: 300,
filebrowserUploadUrl: "upload.php",
});
</script>
<button name="answer_submit">Post your Answer</button>
</form>
One more thing, I have seen a method like
http://localhost:8081/qa/506/how-to-connect-the-html-page-to-the-mysql-database-using-php?state=ans-890 .
If I open this URL it opens textarea.
- How can I jump to the Textarea box area after login (Bottom HTML text editor)
- How can I edit the answer. if the user clicks on the edit button or link then jump to textbox and edit data. After the edit submitted jump to the updated answer.