Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<?php
// Redirect browser
header("location:[URL unfurl="true"]http://localhost/profiles/list_companies-test.php");[/URL]
include("includes/connection.php");
$id = $_GET[id];
$query1 = "INSERT into tblCompanies1 (SELECT * FROM tblCompanies WHERE id=$id)";
$query2 = "DELETE from tblCompanies WHERE uniqueid = $id";
$sql = ("$query1" . "$query2");
$rs = odbc_exec($conn,$sql);
if (!$rs)
{exit("Error Occured: No record deleted");}
{echo "<p>Record has been deleted.</p>";}
odbc_close($conn);
?>
$query[] = "INSERT into tblCompanies1 (SELECT * FROM tblCompanies WHERE id=$id)";
$query[] = "DELETE from tblCompanies WHERE uniqueid = $id";
foreach ($query as $sql){
$rs = odbc_exec($conn,$sql);
if (!$rs)
{exit("Error Occured: No record deleted");} else
{echo "<p>Record has been deleted.</p>";}
}
odbc_close($conn);
<?php
// Redirect browser
header("location:[URL unfurl="true"]http://localhost/profiles/list_companies-test.php");[/URL]
include("includes/connection.php");
$id = $_GET[id];
$query[] = "INSERT INTO tblCompanies1 (companyName, corpAddress1, corpAddress2, city, state, zip, country, officePhone, emailAddress, website, dateCreated, createdBy, dateUpdated, updatedBy)
SELECT *
FROM tblCompanies
WHERE id = $id";
$query[] = "DELETE FROM tblCompanies WHERE id = $id"; /* This line works */
foreach ($query as $sql){
$rs = odbc_exec($conn,$sql);
if (!$rs)
{exit("Error Occured: No record deleted");} else
{echo "<p>Record has been deleted.</p>";}
}
odbc_close($conn);
?>
<?php
// Redirect browser
header("location:[URL unfurl="true"]http://localhost/profiles/list_companies-test.php");[/URL]
include("includes/connection.php");
$id = $_GET[id];
$query[] = "INSERT INTO tblCompanies1 (companyName, corpAddress1, corpAddress2, city, state, zip, country, officePhone, emailAddress, website, dateCreated, createdBy, dateUpdated, updatedBy)
SELECT *
FROM tblCompanies
WHERE id = $id";
$query[] = "DELETE FROM tblCompanies WHERE id = $id"; /* This line works */
foreach ($query as $sql){
$rs = odbc_exec($conn,$sql);
if (!$rs)
{exit("Error Occured: No record deleted");} else
{echo "<p>Record has been deleted.</p>";}
}
odbc_close($conn);
?>
$query[] = "INSERT INTO tblCompanies1 (companyName, corpAddress1, corpAddress2, city, state, zip, country, officePhone, emailAddress, website, dateCreated, createdBy, dateUpdated, updatedBy)
SELECT *
FROM tblCompanies
WHERE id = $id";
$query[] = "DELETE FROM tblCompanies WHERE id = $id"; /* This line works */
...
$id = (int) $_GET[id];
...
...
// Get the query string for the id
$id = intval($_GET['id']);
if(empty($id))
{
// Tell the user that they need a valid id
echo 'Please check your link. You need a valid identifier.';
}
else
...
...
$id = $_GET[id];
$length = strspn($id, "1234567890");
if($length != strlen($id))
{
echo 'Something bad just happened';
}
else
...