is there a postback function in php?
Moderator: General Moderators
is there a postback function in php?
Hi, I was just wondering if there is a postback function in php like asp.net? I guess I could just have a html_post variable but was wondering if there was a specific function I should use
- Sevengraff
- Forum Contributor
- Posts: 232
- Joined: Thu Apr 25, 2002 9:34 pm
- Location: California USA
- Contact:
it's a mechanism that assigns an unique id to a html-element and adds a small javascript function to the generated document to submit a request on certain events for that element. e.g. having a form likeyou can define a function (server-side)that is invoked for the specific element-event.
Php does not provide such a mechanism by default. It's a light-weight framework
But you might want to use http://php.net/uniqid if you're going to code something similar yourself. Maybe a similar framework already exists for php but that I don't know
Code: Select all
<form runat="server" id="aForm">
<asp:linkbutton id="aButton" runat="server" text="bla bla bla" onclick="aButton_Click" />
</form>Code: Select all
<script language="VB" runat="server">
Sub aButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
' event handler code
End Sub
</script>Php does not provide such a mechanism by default. It's a light-weight framework
But you might want to use http://php.net/uniqid if you're going to code something similar yourself. Maybe a similar framework already exists for php but that I don't know
like, when you refreash a page in asp.net you can test to see if it has been refreased.
Basically I want to display a send email form. When the form is submitted I would like a confirmation message that the email has been sent. If the user then refreashes the page it should go back to the send form.
Basically I want to display a send email form. When the form is submitted I would like a confirmation message that the email has been sent. If the user then refreashes the page it should go back to the send form.