You are here: Need urgent help on post php long code « PHP « IT news, forums, messages
Need urgent help on post php long code

Posted by Pieter du Toit on 04/21/05 10:55

I have the following code:
function display_setcom() {

global $config;

dsprint("display_setcom()");

dprint($_SESSION["logged_in"]);

$user_id = $_SESSION["logged_in"];

$result = mysql_query("SELECT users.user_first_name, users.user_last_name,
users.user_cell, users.user_idnom, users.user_email, users.user_adres1,
users.user_adres2, users.user_pcode, users.user_city, users.user_prov FROM
users WHERE users.user_id = '$user_id'");

if (mysql_num_rows($result) == 1) {

$user_detail = check_user_details($user_id); //app.func.inc.php


dprint($user_detail);

if ($user_detail === true) {

$row = mysql_fetch_assoc($result);

dprint($row);

extract($row);




$ewal_result = mysql_query("SELECT DECODE(ewallet.ewal_pass,
'{$config["password_password"]}') AS ewal_pass FROM ewallet WHERE
ewallet.user_id = '$user_id'");

if (!mysql_error()) {

if (mysql_num_rows($ewal_result) > 0) {

$row = mysql_fetch_assoc($ewal_result);

extract($row);

dprint($row);

}

} else {

dprint(mysql_error());

}


dprint($ewal_tosetcom);

$Co_ID = $config["e_wallet"]["Co_ID"];

$Outlet = $config["e_wallet"]["Outlet"];

$transac = get_nextid($_SESSION["database"], "transacs", "tran_id", "tran");

!!!!! this is where i echo all my required vars to post, and i get a value
for each, but when i post to the next form only $co_id and $outlet is posted
!!!!!!

echo "Admin testing<br>";

echo "coid = ".$Co_ID;

echo "Outlet = ".$Outlet;

echo "user_email = ".$user_email;

echo "ewal_pass = ".$ewal_pass;

echo "user_id = ".$user_id.$transac;

echo <<< END

<p class="WARN">The following details are used for your credit card
transactions,<br>if they are incorrect or incomplete, please go to <a
href="index1.php?display=details">My Details</a> and update your
details.<br>If it is correct, you can click on the button below to TopUp
eWallet</p>

<form action="testvars.php" method="post" name="setcom">

<table CLASS="PREDICT" border="1" align="center">

<tr class="minmaxtxt">

<td>Name:</td>

<td class="minmaxtxtco"><input name='Name' type='hidden' maxlength='25'
size='35' value="$user_first_name $user_last_name">$user_first_name
$user_last_name</td>

</tr>

<tr class="minmaxtxt">

<td>Cellphone Number:</td>

<td class="minmaxtxtco"><input name='Tel' type='hidden' maxlength='10'
size='15' value="$user_cell">$user_cell</td>

</tr>

<tr class="minmaxtxt">

<td>ID Number:</td>

<td class="minmaxtxtco"><input name='Addonfields' type='hidden'
maxlength='13' size="17" value="Identity:$user_idnom">$user_idnom</td>

</tr>

<tr class="minmaxtxt">

<td>Address:</td>

<td>

<table border="1" class="PREDICT">

<tr class="minmaxtxt">

<td>Streetname & Number:</td>

<td class="minmaxtxtco"><input name='Address1' type='hidden' maxlength='255'
size='15' value="$user_adres1">$user_adres1</td>

</tr>

<tr class="minmaxtxt">

<td>Suburb/Area:</td>

<td class="minmaxtxtco"><input name='Address2' type='hidden' maxlength='255'
size='15' value="$user_adres2">$user_adres2</td>

</tr>

<tr class="minmaxtxt">

<td>Post/Zip Code:</td>

<td class="minmaxtxtco"><input name='Zip' type='hidden' maxlength='9'
size='10' value="$user_pcode">$user_pcode</td>

</tr>

<tr class="minmaxtxt">

<td>City:</td>

<td class="minmaxtxtco"><input name='City' type='hidden' maxlength='25'
size='15' value="$user_city">$user_city</td>

</tr>

<tr class="minmaxtxt">

<td>Province/State:</td>

<td class="minmaxtxtco"><input name='State' type='hidden' maxlength='25'
size='15' value="$user_prov">$user_prov</td>

</tr>

<tr class="minmaxtxt">

<td>Country</td>

<td class="minmaxtxtco">

<select name="Country">

<option value="ZA">South Africa</option>

</select>

</td>

</tr>

</table>

</td>

<tr class="ROW1">

</table>

<br>

<table class="PREDICT" border="1" align="center">

<tr class="minmaxtxtco">

<td>TopUp Amount:</td>

<td><input type="text" name="CC_amount">

</tr>

<tr class="minmaxtxt">

<td colspan="2" align="center">

<input type="submit" name="register" value="TopUp eWallet" onClick="if
(!ValidAmount(setcom.CC_amount.value)) { alert('Please enter a valid
amount'); return (false);};">

</td>

</tr>

</table>

<input type="hidden" name="Co_ID" value="$Co_ID">

<input type="hidden" name="Outlet" value="$Outlet">

<input type="hidden" name="UserName" value="$user_email">

<input type="hidden" name="Password" value="$ewal_pass">

<input type="hidden" name="Reference" value="$user_id:$transac">

<input type="hidden" name="Lang" value="ENG">


END;

if ($tosetcom === 0) { //If the user has not been registered yet.

print("\t\t\t<input type=\"hidden\" name=\"ConfirmPassword\"
value=\"$ewal_pass\">\n");

}

print("\t\t</form>\n");

} else {

print("<p class=\"WARN\">Your details are not complete. Please update them
at <a href=\"index1.php?display=details\">My Details</a> before you can
TopUp your account</p>\n");

}

} else {

$_SESSION["error"] .= "<p class=\"WARN\">Could not fetch user details,
please try again later.</p>\n";

dprint(mysql_error());

}

}

i really need help here, have a deadline

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация