Welcome Guest, Not a member yet? Register   Sign In
How to redirect localhost php file from webserver php file
#6

[eluser]JasmineFlower[/eluser]
hi,

this is my code fenceServer.php


Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
&lt;html&gt;
&lt;head&gt;
<.script   type="text/javascript" language="javascript">
function redirect()
{
    window. location = 'http://192.168.1.3/skycad/fence.php';  
    
}
[removed]


&lt;title&gt;eStairs-1m2-Stair&lt;/title&gt;
&lt;/head&gt;
&lt;bodyonload="redirect();" &gt;
&lt;?php
$sort=$_POST["sort"];
$A00=$_POST["A00"]; //Project No.
$A01=$_POST["A01"]; //Customer_code
$A02=$_POST["A02"]; //A
$A03=$_POST["A03"];    //B
$A04=$_POST["A04"];    //C
$A05=$_POST["A05"];    //D
$A06=$_POST["A06"];    //E
$A07=$_POST["A07"];    //F
$A08=$_POST["A08"];    //G
$A09=$_POST["A09"];    //H
$A10=$_POST["A10"];    //I
$A11=$_POST["A11"];    //J
$A12=$_POST["A12"];    //K
$A13=$_POST["A13"];    //L
$A14=$_POST["A14"];    //2D
$A15=$_POST["A15"];    //3D
$A16=$_POST["A16"];    //Dimensioned 2D
$status="open";

$conn=mysql_connect("serverhostname","username","password");
if($conn)
{
    $db=mysql_select_db("dbname",$conn);    
    if($db)
    {
        
        $q=mysql_query("insert into draw_fence(project_no,customer_code,fence_A,fence_B,fence_C,fence_D,fence_E,fence_F,fence_G,fence_H,fence_I,fence_J,fence_K,fence_L,2D,3D,dimen_2D,status)values('$A00','$A01','$A02','$A03','$A04','$A05', '$A06','$A07','$A08','$A09','$A10','$A11','$A12','$A13','$A14','$A15','$A16','$status')");    
        
    }
    else
    {
        echo mysql_error();
    }
}
else
{
    echo "not connected";
}


?&gt;
&lt;/body&gt;
&lt;/html&gt;


Messages In This Thread
How to redirect localhost php file from webserver php file - by El Forum - 05-04-2011, 11:57 PM



Theme © iAndrew 2016 - Forum software by © MyBB