PHP Header Error on HTML Page

I'm trying to put some php I made into an html file but I'm running into a snag. My PHP script is a login in script and when I successfully login I get the folowing error:
Warning: Cannot modify header information - headers already sent by (output started at /home/tyharox1/public_html/login.php:64) in/home/tyharox1/public_html/login.php on line 83
Below is the code for the html file with with the php already writen in. Can anyone help me resolve this issue?
<?php
session_start();
include ('mysql.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--[if lt IE 9]>
<script src="html5shiv.js"></script>
<![endif]-->
<link href='http://fonts.googleapis.com/css?family=Coda' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="mainmenu.css"/>
<link rel="stylesheet" type="text/css" href="submenu.css"/>
<link rel="stylesheet" type="text/css" href="mainpage.css"/>
<link rel="stylesheet" type="text/css" href="slideshow.css"/>
<link rel="stylesheet" type="text/css" href="ribons.css"/>
<script type="text/javascript" src="js/jquery-1.2.6.js"></script>
<script type="text/javascript" src="js/startstop-slider.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Home</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<style type="text/css">
body {
          background-color: #222;
</style>
</head>
<body>
<div>
<img name="Logo" src="images/84087.jpg" width="100%" height="50px" alt="" />
</div>
<div id='mainmenu'>
          <ul>
                      <li class='active '><a href='Templates/index.html'><span>AITP</span></a></li>
                       <li><a href='#'><span>test</span></a></li>
                       <li><a href='#'><span>test</span></a></li>
                       <li><a href='#'><span>test</span></a></li>
                       <li><a href='#'><span>test</span></a></li>
          </ul>
    </div>
</div>
<div id="submenu">
                    <ul>
                                 <li class='active'><a href='Templates/index.html'><span>Home</span></a></li>
                                 <li><a href='#'><span>About Us</span></a></li>
                                 <li><a href='#'><span>Calendar</span></a></li>
                                 <li><a href='#'><span>Contact</span></a></li>
                                 <li><a href='#'><span>Members</span></a></li>
                    </ul>
          </div>
<div>
</div>
<div class="ribbon">
    <h3>Memeber Login</h3>
    <section id="filler">
          Please Login
    <?php
session_start();
include ('mysql.php');
if (isset ($_POST['submit'])) {
                    $username = mysql_escape_string($_POST['username']);
                    $password = mysql_escape_string(sha1($_POST['password']));
                    if (!empty ($username) && !empty ($password)) {
                                        $sql = mysql_query ("SELECT * FROM users
                                                                                          WHERE username='".$username."' AND
                                                                                          user_password='".$password."' LIMIT 1");
                                        if (mysql_num_rows ($sql) > 0) {
                                                  $_SESSION['loggedin'] = true;
                                                  $_SESSION['username'] = $username;
                                                  header("Refresh: 2; url=index.html");
                                                                   echo '<span style="color: #063; font-weight: bold;">Login Successful! You are now being redirected, Please Wait...</span>';
                                        }else{
                                                  echo 'Your username and/or password is incorrect!';
                    }else{
                              echo 'You must enter a suername and password!';
}else{
echo '<form action="login.php" method="post">
Username: <input type="text" name="username" /><br />
Password: <input type="password" name="password" /><br />
<input type="submit" name="submit" value="login" />
</form>';
?>
    <section id="date">
                    <span id="publisher">Publisher:</span> Jane Doe <span id="publisher">Date:</span> Oct. 10, 2012
    </section>
    </section>
</div>
</div>
<div id="footer">
</div>
</body>
</html>

You cannot use the PHP header function after anything has sent to the browser. Anything. You can have 100 lines of PHP before header() as long as the script doesn't send anything to the browser.
So your options are to revise your code accordingly or use a javascript alternative, as in this example, where a little embedded php defines the actual url, but javascript is used to process it:
<script type="text/javascript">
window.location = "<?=$url?>";
</script>

Similar Messages

  • Error in html  Page while deleting record.

    Hi all
    Can any one help me out in solving this problem
    Actually i am getting some error while deleting record in html page created usin OAF.
    Error.
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.DMLException: JBO-26080: Error while selecting entity for xxPersonDetailsEOP
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(Unknown Source)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(Unknown Source)
         at xxt.oracle.apps.ak.webui.xxPersonMainCO.processFormRequest(xxPersonMainCO.java:54)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ## Detail 0 ##
    java.sql.SQLException: ORA-00911: invalid character
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:503)
         at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:1029)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:535)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1126)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3043)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelect(OracleSQLBuilderImpl.java:730)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:5594)
         at oracle.apps.fnd.framework.server.OAEntityImpl.doSelect(Unknown Source)
         at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:3847)
         at oracle.apps.fnd.framework.server.OAEntityImpl.lock(Unknown Source)
         at oracle.jbo.server.EntityImpl.beforePost(EntityImpl.java:4328)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:4472)
         at oracle.apps.fnd.framework.server.OAEntityImpl.postChanges(Unknown Source)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2996)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2807)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1971)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2173)
         at oracle.apps.fnd.framework.server.OADBTransactionImpl.commit(Unknown Source)
         at xxt.oracle.apps.ak.server.xxPersonAMImpl.deletePersonMethod(xxPersonAMImpl.java:49)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(Unknown Source)
         at xxt.oracle.apps.ak.webui.xxPersonMainCO.processFormRequest(xxPersonMainCO.java:54)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    java.sql.SQLException: ORA-00911: invalid character
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:503)
         at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:1029)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:535)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1126)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3043)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelect(OracleSQLBuilderImpl.java:730)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:5594)
         at oracle.apps.fnd.framework.server.OAEntityImpl.doSelect(Unknown Source)
         at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:3847)
         at oracle.apps.fnd.framework.server.OAEntityImpl.lock(Unknown Source)
         at oracle.jbo.server.EntityImpl.beforePost(EntityImpl.java:4328)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:4472)
         at oracle.apps.fnd.framework.server.OAEntityImpl.postChanges(Unknown Source)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2996)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2807)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1971)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2173)
         at oracle.apps.fnd.framework.server.OADBTransactionImpl.commit(Unknown Source)
         at xxt.oracle.apps.ak.server.xxPersonAMImpl.deletePersonMethod(xxPersonAMImpl.java:49)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(Unknown Source)
         at xxt.oracle.apps.ak.webui.xxPersonMainCO.processFormRequest(xxPersonMainCO.java:54)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)

    Paste your code.
    -Anand

  • Password Protect All Directories - Header code to load pages?

    My site was hacked so now I'm being extra security aware. If I password protect all of my directories, of course they don't load on the front end without the password being entered. Is there a way add code to key files like the header code perhaps which would provide the username and password for every prompt? I used the same username and password for all directories which I protected.
    This is mostly a php site with some html pages, all front end pages using the same header code.
    Thanks in advance.

    Hi
    The simplest way is to use an htaccess file to restrict access, but how will your users see any of your pages if you protect the entire web site?
    PZ

  • Php script on html page?

    how would i insert a php {login script} on a .html page? would i have to externally link to the file?

    any ideas? i have tried putting "<?php" and "?>" at the begining and end, but it still does not like it... on the webpage, "Click Here to Register'); } while($info = mysql_fetch_array( $check )) { $_POST['pass'] = stripslashes($_POST['pass']); $info['password'] = stripslashes($info['password']); $_POST['pass'] = md5($_POST['pass']);  //gives error if the password is wrong if ($_POST['pass'] != $info['password']) { die('Incorrect password, please try again.'); }else {  // if login is ok then we add a cookie $_POST['username'] = stripslashes($_POST['username']); $hour = time() + 3600; setcookie(ID_my_site, $_POST['username'], $hour); setcookie(Key_my_site, $_POST['pass'], $hour);  //then redirect them to the members area header("Location: test_members.php"); } } } else {  // if they are not logged in ?>" shows, then the login box.

  • Error while invoking BPEL Process through HTML Page

    Hi ,
    I have created a HTML Page to invoke BPEL synchronous process .
    HTML Page contains :
    <html>
    <head>
    <title>Untitled Document</title>
    <h1>Add Macro Task Input Form </h1>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="cyan" text="#000000">
    <form name="form1" method="get" action="/httpbinding/default/AddMacroSync/process">
    EmployeeId :
    <input type="text" name="EmployeeId" ><br>
    <br>
    TaskName :
    <input type="text" name="MacroTaskName" >
    <button
    id="identifier"
    class="dialog"
    label="OK"
    accesskey="t"/>
    <br>
    </form>
    </body>
    </html>
    I am able to invoke my BPEL Process named as " AddMacroSync" .
    It also creating instance for this BPEL Process .
    But when I go BPEL Console and check my instance , it is always faulted .
    I am providing two inputs : Employee Id and Taskname through HTML Page .
    These inputs got assigned to their respective output variables .
    But when I click on audit link ..it shows error while invoking the Process .
    It Show error :
    when invoking endpointAddress 'http://152.69.248.232:8990/AddMacroTask-AddMacroTask-context-root/AddMacroTaskWebService', [java.lang.NumberFormatException]
    But this end point address is working when I put this address in URL .
    Please someone help me how to solve this problem .
    Thanks
    Prashant Dwivedi
    Message was edited by:
    Prashant Dwivedi

    Hi Clemens ,
    I changed My HTML ...Now it looks like as :
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="application/x-www-form-urlencoded; charset=iso-8859-1">
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <form name="form1" method="post" action="/httpbinding/default/AddMacroSync">
    <input type="hidden" name="msg_part" value="payload">
    <input type="hidden" name="namespace" value="http://xmlns.oracle.com/AddMacroSync">
    EmployeeId:
    <input type="text" name="EmployeeId">
    TaskName :
    <input type="text" name="TaskName">
    <input type="submit" name="Submit" value="Submit">
    </form>
    </body>
    </html>
    After this when I try to incoke my BPEL Process through this HTML :
    I am gettign following error :
    500 Internal Server Error
    java.lang.IllegalStateException: IOException: Premature end of POST data
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.EvermindHttpServletRequest.getParameter(EvermindHttpServletRequest.java:2452)
         at com.collaxa.cube.ws.http.HttpBindingServlet.checkSecurity(HttpBindingServlet.java:281)
         at com.collaxa.cube.ws.http.HttpBindingServlet.doPost(HttpBindingServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)

  • Safari 4.0.4 & PhP 4 "Can't send header" error message

    Everyone...
    I am currently recoding many of our PhP templates & HTML to better conform to the newer browsers (IE 8, FF 3.6, Opera 10, Safari 4.0.4 and AOL 9) and cannot resolve the issue with the Safari browser...
    Essentially, when going from one module to another (requiring a redirect header statement) the Safari 4.0.4 ALWAYS rejects the request with the "Cannot send header" error.
    I recoded some of the Php code so it will not work in IE 7/8, Opera 10, FireFox 3.6, AOL 9.... Yet Safari 4.0.4 just does not want to work..
    Does anyone have any suggestions? I am aware that when sending a new header (via redirect) that NOTHING can be posted to the browser ahead of the header request (ie: space, html command, etc...).
    Thanks!

    Thanks, as far as I know, there isn't one. Any other suggestions? I just uninstalled Thunderbird and deleted all saved settings and re-installed. Still not working.
    thanks!

  • I have 5 html pages that share a common header, footer, and sidebar. how do i use my nav bar to change the content of the body without duplicating a lot of code?

    i have 5 html pages that share a common header, footer, and sidebar. how do i use my nav bar to change the content of the body without duplicating a lot of code? thank you!

    i inherited the website. It’s for a non-profit and is not very
    sophisticated, and neither am I in webdesign. It currently has multiple
    pages that are identical except for that body section, so whenever i change
    the navigation (in the sidebar) I have to update every html page.  I want
    to have one basic page, and just call in the different body content based
    on the link the user selects from the nav bar. How can i do that using a
    script? i am using Dreamweaver.
    ~ in love and light ~
    Jeannie
    On Sat, Feb 7, 2015 at 4:07 AM, Ben Pleysier <[email protected]>

  • Use PHP to convert html page to a pdf file for email

    I want to use my php scripts to send an email (with a pdf attachment) of the web page that is being viewed.
    My problem I have no way to convert the html page to a pdf file without the end user being prompted to (1) naming the file (2) saving it
    Is there a program or a way i can save the html as "auto_name.pdf" file on the server without user input?
    I have Adobe Acrobat 6.0 Professional on server

    There are lots of good Html to Pdf conversion tools for developers, both free and paid. I'd suggest to take a look at PD4ML Html to Pdf converter - it has lots of features (CSS support, page layout presets, etc.) and can be obtained for free for non commercial usage. There is also a topic at Stackoverflow with a list of such converters.

  • Content-Lenght header on html pages

    I hope this is a simple one, and I am just lame in my web searching skills, but how would one get the Sun One Web Server 6.1 to include the Content-Length response header on requests for html pages?
    If I curl the web server for say an exe file (application\octet-stream mime type) the server sends me a Contetn-Length header in the response. When I curl a html page from the same server there is no Content-Length header in the response.
    I have a developer that wants to use this header to determine if we need to delete the object from our CDN network, which by the way does provide the Content-Length response header on html pages.
    Thanks in advance for any help on this.

    If there's no Content-Length header in the response when you request a .html file, server-parsed HTML has likely been enabled. When server-parsed HTML (aka SHTML or SSI) is enabled, the server parses the .html file and dynamically generates a response. When the response is dynamically generated, the server doesn't know how long the response will be until it has been completely generated. As a result, the server may omit the the Content-Length header.
    You can disable server-parsed HTML in the administration server GUI.

  • How do i reference a div on html page with php?

    This question is an extension to a topic I asked last week...
    I am programming a form within a div on the page..
      <div id="contact_form">
      <form name="contact" action="showEntry()">
        <fieldset>
          <p>
            <input type="text" name="name" id="name" size="30" value="" class="text-input" />      </p>
          <p>
            <input type="submit" name="submit" class="button" id="submit_btn" value="Send" />
          </p>
        </fieldset>
      </form>
    </div>
    Above that I have the php code to declare a function showEntry()
    <?php
    function ShowEntry() {
    ?>
    What I want to do is run the function to show what was entered and place a piece of code so that the div containing the form is cleared and replaced with a reply...
    The ajax example code to reference the div is below...
    function() {
          $('#message').html("<h2>You entered {fieldset.name.value}</h2>")
    What I want to do is make all this code appear on one HTML page together...
    Basically the user enters their name, presses send.
    The form disappears and the message is placed in it's place...
    Thank you in advance for any feedback..
    Terry

    Nancy O. wrote:
    Herbert2001 wrote:
    BUT honestly, you'd be much better off using some kind of php framework to take care of email stuff and routing... writing your own protected secure code is like re-inventing the wheel...
    Totally agree. 
    Just curious, which PHP frameworks are you using, Herbert? 
    Nancy O.
    Hey Nancy & Murray,
    Currently I use Laravel, though lately I've been lured more and more into Python and Pyramid/Django. I really like Python, because it is far more consistent as a language than PHP (which, honestly, is very, very messy compared to other languages - it's a legacy thing**).
    I've also used http://fatfreeframework.com/home for smaller personal things, because it's a very tight and easy to use mini framework.
    And, although it is not a 'real' framework, I have to do a lot of work in Wordpress (mainly because clients require it from me, not my own choice ;-).
    You can find Laravel here: http://laravel.com/
    Python things I am checking out currently:
    Django: https://www.djangoproject.com/
    Pyramid: http://www.pylonsproject.org/
    Again, I think that Python is a beautiful language, and if I could I would switch to that for my web work completely. But not quite yet. :-) Not saying PHP is bad, though - I've worked with it for the longest time; it's just quirky in places.
    ** see http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/

  • Php won't run when in html pages

    On my server php do not run when inserted in html pages. If I rename the file in .php, all runs correctly but I don't want to rename all my files... I know there is a way to make php run in html pages, but i can't find it.
    Any help would be apreciated...

    For anyone else that reads this - you can't get there from here.
    If you want PHP to execute, the file must be named .php, .php4, .php5, etc. You can have standard HTML in the file and enclose the PHP with tags <? script here ?> to run and that will work, but the file MUST NOT be named .htm or .html, or even .shtml or the scripting will not execute.
    It WILL, however, show your code to anyone surfing the page - including any passwords or other secrety-type thingys.

  • Combining PHP Pages With HTML Pages.

    Hi,
    I started building my site in Dreamweaver CS4 using HTML pages, not knowing until now that any pages with interactivity need to be php.
    If my site has seven pages, can four of them be HTML, and the rest PHP? If so, are there any special considerations I have to take into account? Is there anything special that would have to be done at any time during the process of creating the PHP pages, uploading to a web host, etc?
    If not, is there a way to convert the HTML pages directly to PHP, or do I have to basically start from scratch?
    Thank you.

    Better to be consistent.  You CAN have php,  htm, html and shtml pages in your site, but this could cause a server conflict if you accidentally upload more than one index page to the same folder.
    Simply rename your ***.htm pages to ***.php (F2).
    Remove ***.htm pages from testing and remote servers.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • Convert DW html pages to PHP in Dreamweaver CS4

    Created web pages in DWCS4 in html but discovered because I need some form pages to interact with MySQL that I should have created pages using DW PHP format. Is there a simple way to convert all html pages to php using dreamweaver CS4? OS is Win XP. Have access to hosting company with MySQL, PHP,PHPAdmin.

    I would recommend against Nancy's suggestion here (and it's REALLY weird to see myself typing that).
    I say it only because you are working within an existing site that likely already has links going to the .html file you are changing.
    If you do a Save As and create a new .php file based on the still existing .html file, you will need to manually change the links on the pages that are currently pointing to the that .html file so they will point to the new .php file. You would need to either open the pages individually and fix the links, or use DW's Find & Replace feature and do a site-wide correction.
    However, if you change the file extension from within the Files tab instead, DW will  update any pages that link to it automatically.

  • Redirect HTTP 404, 401 errors to custom html pages ?

    Does anyone know how to set up Weblogic 6.1 to TRAP and REDIRECT http 404, 401 etc error messages to custom predefined friendly html pages on the server ?? Here, WL takes http requests directly and outputs the results directly back to the browsers (not going through a proxy server like IPlanet or other web servers).
    So how do I trap HTTP error messages in WL and redirects them to my own custom error pages ??
    Help!

    Hi Aswin,
    Vintela libraries changed in SP3. Usually a 404 error means:
    - Typo in any of the xml tags (you can check opening it in IE)
    - Typo in the SPN (cannot be found). However, you mention seeing in stdout.log "credentials obtained" so it looks that's fine
    - If you are using keytab, comment those lines in web.xml and use the password in Tomcat > Java
    If nothing mentioned above solve the issue, I will suggest you to enable debug in Tomcat and post here the stdout.log
    Regards,
    Julian

  • Test fails after php install: "Error executing file"  and "no protocol"

    With version 10.1.3.3.0, after installing the php extension, a simple test file fails with the log message of:
    >>
    Error executing file:/pgmdev/phpApp1/phpProj1/public_html/test1.php
    Reason: no protocol: /pgmdev/test1.php
    <<
    Contents of test1.php:
    <html>
    <head>
    <title>PHP Test: test1.php</title>
    </head>
    <body>
    <?php phpinfo(); ?>
    </body>
    </html>
    Any suggestions?

    Additional info:
    This is on a Fedora 8 box that is running Oracle XE and ZendCore php just fine. Running the test.php page from /var/www/html produces the expected results, so apache is running as it should. The ZendCore control panel functions as well.

Maybe you are looking for

  • Photo stream account questions

    good day all! hoping to get some advice as i searched the web and cant find it. both questions pertain to photo stream 1. if i am using a 'shared photo stream' is there a setting that will allow me to automatically upload every photo i take on my iph

  • Submitting Forms

    An individual submitted a form and then tried to resubmit the form with more information and was not able to.  Any ideas?  It was from the same email address and now the email button did not respond.

  • Recorded Sound, please help

    I shot a movie recently, and since the audio we recorded on some of the scenes sucked, we dubbed a few of them. Some of these scenes take place outside, but we dubbed them in a small room and when the recorded sound is placed over the scene, it sound

  • Usage of BAPI_LEAD_CHANGEMULTI ( of CRM)

    Hello All,   I am using the BAPI BAPI_LEAD_CHANGEMULTI to change the status and texts of a lead in CRM. I am able to change the status but not the texts.   Any information on this BAPI is welcome. Sample code would be great. Thanks. Srinivas

  • Backup archivelog all delete all input

    RMAN> backup archivelog all delete all input; i have backed up all my archivelogs using the above command, but after the backup archivelogs are not deleted from its default location .ie my default archive location is '/oracle/archive' . After executi