MySQL Forums
Forum List  »  PHP

Easy Help for someone well-versed in PHP
Posted by: Chirs Dotcey
Date: August 27, 2005 12:47AM

Please help, I had to make a text update to a php page on my website and after making the update, the page now displays the source code. Prior to the update it displayed correctly

Here is the URL so you can see what it's now displaying:
https://host115.ipowerweb.com/~discreet/shop.php?prodid=5026&qty=1&add_to_cart=true

And below is the source code for someone well-versed in PHP. Please help...I'm desparate. Thank you in advance for your time.


<?
if (!$cid) {
setcookie ("cid",$passed_cid,time()+3888000);
}

include ("includes/GetSession.inc");

7?>
<HTML>
<HEAD>
<title>Discreet Skiptrace</title>
<META NAME="description" CONTENT="Complete Skiprace can find personal information such as phone numbers and address for anyone.">
<META NAME="Keywords" CONTENT="Reverse Phone Search, Name & Address from cell phone pager, Name and phone number from address, Name & address from disconnected number, Name & address from toll free or 900 numbers, Cellular number acquisition, Cellular monthly report of ALL outgoing calls, Residential monthly report, PO Box address to physical address search, Social Security number search, Utility Non-published number search, Utility search by City State, Vehicle tag search, Vehicle VIN search, Website URL ownership information, people search, people finder, find people, people locator, finding people">
<LINK REL="stylesheet"
TYPE="text/css"
HREF="style/main.css">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=275,height=300');");
}
// End -->
</script>
<SCRIPT LANGUAGE = "JavaScript">
<!--
function Validator(theForm)
{
var error = "";
if (theForm.req_first_name.value == "")
{
error += "Please enter your first name.\n";
}
if (theForm.req_last_name.value == "")
{
error += "Please enter your last name.\n";
}
if (theForm.req_address.value == "")
{
error += "Please enter your billing address.\n";
}
if (theForm.req_city.value == "")
{
error += "Please enter your city.\n";
}
if (theForm.req_state.value == "")
{
error += "Please enter your state.\n";
}
if (theForm.req_zip.value == "")
{
error += "Please enter your zip code.\n";
}
if (theForm.req_tran_card_num.value == "")
{
error += "Please enter your credit card number (no hyphens or spaces).\n";
}
if (theForm.req_tran_exp_date.value == "")
{
error += "Please enter the expiration date (MMYY).\n";
}
if (theForm.agree.checked == false )
{
error += "Please check the box if you agree to the Terms of Service.\n";
}
if (error != "")
{
alert(error);
return (false);
} else {
$ip = $_SERVER['REMOTE_ADDR'];
return (true);
}
}
// -->
</script>
</head>
<BODY bgcolor="#FFFFFF" marginwidth="0" leftmargin="0" rightmargin="0" topmargin="0">
<!-- Main Banner -->
<map name="top"><area href="http://discreetskiptrace.com/index.html"; coords="10,7,156,80" alt="" /><area href="http://discreetskiptrace.com/index.html"; coords="230,33,490,80" alt="" /><area href="http://discreetskiptrace.com/contactus.html"; coords="576,33,687,55" alt="" /><area href="http://discreetskiptrace.com/contactus.html"; coords="576,33,687,77" alt="" /></map>
<table cellspacing="0" cellpadding="0" border="0">
<tbody><tr><td>
<img border="0" src="http://discreetskiptrace.com/images/new%20banner.jpg"; alt="" usemap="#top" />
</td></tr>
</tbody></table>



<table width="820" cellspacing="0" cellpadding="5" border="0">
<tbody><tr>
<td bgcolor="#ffffff">
OpenConnection();
$db_res = $connect-&gt;ExecSQL($check_qty);
$db_qty = $row[0];
if ($db_qty) {
$quantity = $qty + $db_qty;
} else {
$quantity = $qty;
}

if (1) { // ($prodid == &quot;1&quot;) {

$remove_item = &quot;delete from transaction where session ='$PHPSESSID' and prod_id='$prodid'&quot;;
$connect-&gt;ExecSQL($remove_item);
$add_item = &quot;insert into transaction (raid,session,cid,prod_id,quantity,date) values ('$raid','$PHPSESSID','$cid','$prodid','$quantity','$date')&quot;;
$connect-&gt;ExecSQL($add_item);
$connect-&gt;CloseConnection();
} else {

$add_item = &quot;insert into transaction (raid,session,cid,prod_id,quantity,date) values ('$raid','$PHPSESSID','$cid','$prodid','$quantity','$date')&quot;;
$connect-&gt;ExecSQL($add_item);
$connect-&gt;CloseConnection();
}

}


$connect = new smysql;

if ($r) {
$connect-&gt;OpenConnection();
$remove = &quot;delete from transaction where id = '$r'&quot;;
$connect-&gt;ExecSQL($remove);
$connect-&gt;CloseConnection();
}


?&gt;
<table width="780" cellspacing="1" cellpadding="3">
<tbody><tr>
<td bgcolor="#095aa6" class="BIGW"><strong>ORDER SUMMARY</strong></td></tr>

<form action="https://host115.ipowerweb.com/~discreet/transresult.php"; method="post" name="custinfo" onsubmit="
function onsubmit(event) {

function onsubmit(event) {

function onsubmit(event) {

function onsubmit(event) {

function onsubmit(event) {

function onsubmit(event) {

function onsubmit(event) {

function onsubmit(event) {

function onsubmit(event) {

function onsubmit(event) {

function onsubmit(event) {

function onsubmit(event) {
return Validator(this);
}

}

}

}

}

}

}

}

}

}

}

}
" />
</tbody></table><input type="hidden" value="$sessprods[0]" _num="" .$x="" name="item_" />
<input type="hidden" value="$products[0]" _name="" .$x="" name="item_" />
<input type="hidden" value="$products[1]" _price="" .$x="" name="item_" />
<input type="hidden" value="$sessprods[1]" _qty="" .$x="" name="item_" />
<input type="hidden" value="$products[2]" _ship="" .$x="" name="item_" />&quot;;
echo &quot;&quot;;
echo &quot;&quot;;

} else {

$total=0;
$ship=0;
$x=1;
$query_prods = &quot;select prod_id,quantity,id from transaction where session = '$PHPSESSID'&quot;;
$get_prods = mysql_query ($query_prods,$connect);
while ($sessprods = mysql_fetch_row ($get_prods)) {

$query2 = &quot;select TITLE,PRICE from Services where UNIQUE_ID ='$sessprods[0]'&quot;;
$prod_info = mysql_query ($query2,$connect);
$products = mysql_fetch_row ($prod_info);

echo &quot;\n&quot;;
echo &quot; \n&quot;;
echo &quot; \n&quot;;
echo &quot; \n&quot;;
print (&quot; \n&quot;);

$x++;

$sub_total = $sub_total+($products[1]*$sessprods[1]);
$ship = $ship+($products[2]*$sessprods[1]);

echo &quot;\n&quot;;

}

echo &quot;\n&quot;;

$tran_ship = $ship*100;
$ship_amount = sprintf('$ %.2f',$ship);
echo &quot; \n&quot;;
echo &quot;\n&quot;;
echo &quot;\n&quot;;
echo &quot;\n&quot;;
echo &quot;\n&quot;;
$total = $sub_total + $ship;
$transamount = $total*100;
$amount = sprintf('$ %.2f',$total);
echo &quot; \n&quot;;
}

print (&quot; <br /><table width="580" cellspacing="1" cellpadding="3" border="0" align="center">
<tbody><tr>
<td width="60" valign="middle" height="30" align="center"> <br /></td>
<td width="400" valign="middle" height="30" align="center"><div class="BIGB"><strong>PRODUCT</strong></div></td>
<td width="60" valign="middle" height="30" align="center"><div class="BIGB"><strong>PRICE</strong></div></td>
</tr>

<tr><td colspan="3"><div class="MEDR">There are no items in your cart. <a class="MEDB" href="http://www.discreetskiptrace.com/"><strong>CLICK HERE</strong></a> to view our products.</div></td></tr><tr><td width="100" valign="top" align="left"><a href="https://host115.ipowerweb.com/~discreet/shop.php?r=$sessprods[2]"><div class="MEDB"><strong>REMOVE</strong></div></a></td><td><div class="MEDB">$products[0]<p /></div></td><td align="center"><div class="SMALLB">\$$products[1]<p /></div></td></tr><tr><td align="right" colspan="3"><input type="hidden" name="tran_total_ship" value="$tran_ship" /><br /></td></tr><tr><td colspan="2"> <br /></td><td align="right" class="medy"><strong>_____________</strong></td></tr><tr><td align="right" colspan="3"><strong></strong><div class="SMALLB"><strong>Total: <a class="MEDY">$amount</a></strong></div></td></tr></tbody></table>
<br /><br />

<table width="650" cellspacing="1" cellpadding="3">
<tbody><tr>
<td bgcolor="#095aa6" class="BIGW"><strong>BILLING ADDRESS</strong></td></tr>
<tr>
<td>

<table width="780" cellspacing="2" cellpadding="2" align="center">
<!-- tr>
<td>* <span class=normal>Full Name:</span></td>
<td bgcolor=#000063><input type='text' name='req_name' maxlength=50 OnChange='add_billing();' tabindex=1></td>
<td bgcolor=#E0CD72><input type='text' name='sname' maxlength=50 OnChange='window.document.custinfo.same.checked=false; return false;' tabindex=14></td>
</tr -->
<tbody><tr>
<td align="right" class="SMALLB">* FIRST NAME:</td>
<td><input type="text" value="" name="req_first_name" maxlength="50" onchange="
function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {
add_billing();
}

}

}

}

}

}

}

}

}

}

}

}
" tabindex="1" /></td>
<td width="10"><br /></td>
<td align="right" class="SMALLB">* STATE/PROVINCE: </td>
<td><input type="text" value="" name="req_state" maxlength="45" onchange="
function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {
add_billing(true);
}

}

}

}

}

}

}

}

}

}

}

}
" tabindex="6" /></td>
</tr>
<tr>
<td align="right" class="SMALLB">* LAST NAME:</td>
<td><input type="text" value="" name="req_last_name" maxlength="50" onchange="
function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {
add_billing();
}

}

}

}

}

}

}

}

}

}

}

}
" tabindex="2" /></td>
<td width="10"><br /></td>
<td align="right" class="SMALLB">* ZIP/POSTAL CODE:</td>
<td><input type="text" value="" name="req_zip" size="10" maxlength="10" onchange="
function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {
add_billing(true);
}

}

}

}

}

}

}

}

}

}

}

}
" tabindex="7" /></td>
</tr>
<tr>
<td align="right" class="SMALLB">* ADDRESS:</td>
<td><input type="text" value="" name="req_address" maxlength="35" onchange="
function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {
add_billing(true);
}

}

}

}

}

}

}

}

}

}

}

}
" tabindex="3" /></td>
<td width="10"><br /></td>
<td align="right" class="SMALLB">* COUNTRY:</td>
<td><input type="text" value="" name="req_country" size="10" maxlength="10" onchange="
function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {
add_billing(true);
}

}

}

}

}

}

}

}

}

}

}

}
" tabindex="8" /></td>
</tr>
<tr>
<td align="right" class="SMALLB"> ADDRESS2:</td>
<td><input type="text" value="" name="address2" maxlength="35" onchange="
function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {
add_billing(true);
}

}

}

}

}

}

}

}

}

}

}

}
" tabindex="4" /></td>
<td width="10"><br /></td>
<td align="right" class="SMALLB">* PHONE:</td>
<td class="SMALLG"><input type="text" name="req_phone" size="20" maxlength="13" alert_name="Phone" tabindex="9" /></td>
</tr>
<tr>
<td align="right" class="SMALLB">* CITY:</td>
<td><input type="text" value="" name="req_city" maxlength="45" onchange="
function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {

function onchange(event) {
add_billing(true);
}

}

}

}

}

}

}

}

}

}

}

}
" tabindex="5" /></td>
<td width="10"><br /></td>
<td align="right" class="SMALLB">* EMAIL:</td>
<td align="left"><input type="text" name="req_email" maxlength="45" tabindex="10" /></td>
</tr>
<tr>
<td colspan="5">
<div align="center" class="MEDB"><strong>PLEASE NOTE! We may need to contact you using the contact information above in order to complete your order.
</strong></div></td>
</tr>
<tr>
<td colspan="5">
<br /></td></tr></tbody></table>
</td></tr>
</tbody></table>
<table width="780" cellspacing="1" cellpadding="3">
<tbody><tr>
<td height="10"><br /></td></tr>
<tr>
<td bgcolor="#095aa6" class="BIGW"><strong>CREDIT CARD INFORMATION</strong></td></tr>
<tr>
<td>
<table cellspacing="2" cellpadding="2" border="0" align="center">

<tbody><tr>
<td align="right" class="SMALLB">* CREDIT CARD NUMBER:</td>
<td><input type="text" maxlength="16" size="16" name="req_tran_card_num" tabindex="11" /></td>
<td width="10"><br /></td>
<td align="right" class="SMALLB">* EXP DATE:</td>
<td class="copyright2"><input type="text" maxlength="4" size="4" name="req_tran_exp_date" tabindex="12" /> (MMYY)</td>
</tr>
<tr>
<td align="right" colspan="5"><br /><img src="http://discreetskiptrace.com/images/creditcards.gif"; /></td>
</tr>
</tbody></table>
</td></tr><tr>
<td height="30"><br /></td></tr>
<tr>
<td bgcolor="#095aa6" class="BIGW"><strong>TERMS &amp; CONDITIONS</strong></td></tr>
<tr><td>

<table cellspacing="0" cellpadding="4" border="0" align="center">
<tbody><tr><td width="740" class="SMALLB">By clicking Submit Purchase, you agree to pay the above total amount according to the card issuer agreement. Your charge will show up from Discreet Skiptrace or CCC Inc. on your credit card statement.
</td></tr><tr><td width="400" height="25" class="SMALLB"><p><input type="checkbox" value="0" name="agree" checked="true" />I agree to the terms of this purchase.</p></td></tr>
<tr><td width="550" height="25" align="right"><br />
</td></tr>

</tbody></table>
<p align="center">
<input type="hidden" name="cid" value=".$cid." />
<input type="hidden" name="raid" value=".$raid." />
<input type="hidden" name="session" value=".$session." />
<input type="hidden" name="sub_total" value=".$sub_total." />
<input type="hidden" name="total" value=".$total." />
<input type="hidden" name="comments" .$comments="" value="" />
<input type="hidden" name="reverse_phone" .$reverse_phone="" value="" />
<input type="hidden" name="tag" .$tag="" value="" />
<input type="hidden" name="vin" .$vin="" value="" />
<input type="hidden" name="ssn" .$ssn="" value="" />
<input type="hidden" name="service_name" .$service_name="" value="" />
<input type="hidden" name="service_address" .$service_address="" value="" />
<input type="hidden" name="service_city" .$service_city="" value="" />
<input type="hidden" name="service_state" .$service_state="" value="" />
<input type="hidden" name="service_zip" .$service_zip="" value="" />
<input type="hidden" name="service_box" .$service_box="" value="" />
<input type="hidden" name="service_dob" .$service_dob="" value="" />
<input type="hidden" name="carrier" .$carrier="" value="" />
<input type="hidden" name="search_state" .$search_state="" value="" />
<input type="hidden" name="search_county" .$search_county="" value="" />
<input type="hidden" name="service_url" .$service_url="" value="" />
<input type="hidden" name="ip" .$ip="" value="" />
<br /><br />
<input type="submit" name="buy" value="Submit Purchase" tabindex="21" />

</p><br /><br />
</td>
</tr>
</tbody></table>

</td>
</tr>
</tbody></table>

<img width="6" height="1" border="0" src="http://discreetskiptrace.com/images/reverse_phone_search.gif"; />


<img width="6" height="6" border="0" src="http://discreetskiptrace.com/new/images/unlisted_cell.gif"; /><img width="1" height="6" border="0" src="http://discreetskiptrace.com/new/images/reverse_phone_search.gif"; /><img width="6" height="6" border="0" src="http://discreetskiptrace.com/new/images/peoplesearch.gif"; />






</body>
</html>

Options: ReplyQuote


Subject
Written By
Posted
Easy Help for someone well-versed in PHP
August 27, 2005 12:47AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.