PDA

View Full Version : درخواست کمک در مورد خطای php



babacpiran
شنبه 06 شهریور 1389, 17:11 عصر
<?php
if ($email==Null||$first_name==Null||$last_name==Null ||$password==Null||$state==Null||$postal_code==Nul l||$gender==Null||$_SESSION["confirm_number"]==$HTTP_POST_VARS["entered_number"])
{
if($_SESSION["confirm_number"]==$HTTP_POST_VARS["entered_number"])
{
?>
<form name='send_back' action="join_us.php?country_id=<?php echo $country_id?>&err=3" method='post'>
<?php
}
else
{
?>
<form name='send_back' action="join_us.php?country_id=<?php echo $country_id?>&err=1" method='post'>
<?php
}
?>
<input type='hidden' name='email' value='<?php echo ($email);?>'>
<input type='hidden' name='first_name' value='<?php echo ($first_name);?>'>
<input type='hidden' name='last_name' value='<?php echo ($last_name);?>'>
<input type='hidden' name='state' value='<?php echo ($state);?>'>
<input type='hidden' name='city' value='<?php echo ($city);?>'>
<input type='hidden' name='other_state' value='<?php echo ($other_state);?>'>
<input type='hidden' name='postal_code' value='<?php echo ($postal_code);?>'>
<input type='hidden' name='gender' value='<?php echo ($gender);?>'>
<input type='hidden' name='month' value='<?php echo ($month);?>'>
<input type='hidden' name='day' value='<?php echo ($day);?>'>
<input type='hidden' name='year' value='<?php echo ($year);?>'>
</form>
خطای err=3 می دهد

binyaft
شنبه 06 شهریور 1389, 18:24 عصر
کد رو بین تگ های [PHP] میذاشتید تا بهتر خونده بشه
یا حداقل خطا رو میذاشتید

morteza271
شنبه 06 شهریور 1389, 23:10 عصر
هیچی از سوالتون نمیشه فهمید!!!
لطفا بیشتر توضیح بدین و کدتون رو هم بین تگ بذارین، تا اگه کمکی ازمون براومد بگیم...

bestirani2
یک شنبه 07 شهریور 1389, 04:53 صبح
کد زیر را وارد کن درست میشه


if ($email==Null||$first_name==Null||$last_name==Null ||$password==Null||$state==Null||$postal_code==Nul l ||$gender==Null||$_SESSION["confirm_number"]==$HTTP_POST_VARS["entered_number"])
{
if($_SESSION["confirm_number"]==$HTTP_POST_VARS["entered_number"])
{
?>
<form name='send_back' action="join_us.php?country_id=<?php echo $country_id?>&err=3" method='post'>
<?php
}
else
{
?>
<form name='send_back' action="join_us.php?country_id=<?php echo $country_id?>&err=1" method='post'>
<?php
}
?>
<input type='hidden' name='email' value='<?php echo ($email);?>'>
<input type='hidden' name='first_name' value='<?php echo ($first_name);?>'>
<input type='hidden' name='last_name' value='<?php echo ($last_name);?>'>
<input type='hidden' name='state' value='<?php echo ($state);?>'>
<input type='hidden' name='city' value='<?php echo ($city);?>'>
<input type='hidden' name='other_state' value='<?php echo ($other_state);?>'>
<input type='hidden' name='postal_code' value='<?php echo ($postal_code);?>'>
<input type='hidden' name='gender' value='<?php echo ($gender);?>'>
<input type='hidden' name='month' value='<?php echo ($month);?>'>
<input type='hidden' name='day' value='<?php echo ($day);?>'>
<input type='hidden' name='year' value='<?php echo ($year);?>'>
</form>
--------------------
$postal_code==Nul l
اینجا بین دو تا l مربوط به null فاصله انداخته بودی که باعث خطا میشد

babacpiran
یک شنبه 07 شهریور 1389, 08:28 صبح
country_id=err=3 با تشكر ولي تو برنامه اونجا فاصله نيست بعد از اجرا پيغام زيررا مي دهد واز ادامه مي ايستد خطا در خط
--------------------
country_id=err=3 با تشكر ولي تو برنامه اونجا فاصله نيست بعد از اجرا پيغام زيررا مي دهد واز ادامه مي ايستد خطا در خط6 قرار دارد

binyaft
یک شنبه 07 شهریور 1389, 09:24 صبح
<?php

if ($email==Null||$first_name==Null||$last_name==Null ||$password==Null||$state==Null||$postal_code==Nul l ||$gender==Null||$_SESSION["confirm_number"]==$HTTP_POST_VARS["entered_number"])
{
if($_SESSION["confirm_number"]==$HTTP_POST_VARS["entered_number"])
{
?>
<form name='send_back' action="join_us.php?country_id=<?php echo $country_id?>&err=3" method='post'>
<?php
}
else
{
?>
<form name='send_back' action="join_us.php?country_id=<?php echo $country_id?>&err=1" method='post'>
<?php
}
?>
<input type='hidden' name='email' value='<?php echo ($email);?>'>
<input type='hidden' name='first_name' value='<?php echo ($first_name);?>'>
<input type='hidden' name='last_name' value='<?php echo ($last_name);?>'>
<input type='hidden' name='state' value='<?php echo ($state);?>'>
<input type='hidden' name='city' value='<?php echo ($city);?>'>
<input type='hidden' name='other_state' value='<?php echo ($other_state);?>'>
<input type='hidden' name='postal_code' value='<?php echo ($postal_code);?>'>
<input type='hidden' name='gender' value='<?php echo ($gender);?>'>
<input type='hidden' name='month' value='<?php echo ($month);?>'>
<input type='hidden' name='day' value='<?php echo ($day);?>'>
<input type='hidden' name='year' value='<?php echo ($year);?>'>
</form>


<?php
}
?>


ببین با این درست میشه؟؟؟

babacpiran
یک شنبه 07 شهریور 1389, 13:14 عصر
دوست عزيز از شما متشكرم اونجوري مقدار از برنامه از كار مي افتد نمي دانم وقت داريد كل فايل را براتون مي زارم لطف كنيد نگاهي بندازيد و بعد خطاي Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\HostingSpaces\icanoonc1\icanoon.com\wwwroot\inc ludes\misc.class.php on line 8را مي دهد
مراحل ثبت نام مرحله 2</span>
شما همه فيلد ها را وارد نكرديد-- مراحل ثبت نام </span></div>آدرس ایمیل كه شما انتخاب كرديد در حال حاضر ثبت نام كرده.-- مراحل ثبت نام </span></div>

babacpiran
یک شنبه 07 شهریور 1389, 17:13 عصر
<?php
ob_start("ob_gzhandler");
session_start();
include("includes/top.php");
include("includes/nav.php");
include("includes/conn.php");
//include("includes/right.php");
?>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td width='80%' valign='top'>
<div align='center'>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="dark_b_border2">
<tr>
<td class="dark_blue_white2">
<?php
if ($HTTP_GET_VARS["err"]=="")
{
?>
<strong>&nbsp;مراحل ثبت نام&nbsp;&nbsp;مرحله 2</strong></span></div>
<?php
}
if($HTTP_GET_VARS["err"]==1)
{
?>
<strong>شما همه فيلد ها را وارد نكرديد-- مراحل ثبت نام&nbsp;&nbsp;</strong></span></div>
<?php
}
if($HTTP_GET_VARS["err"]==2)
{
?>
<strong>آدرس ایمیل كه شما انتخاب كرديد در حال حاضر ثبت نام كرده.-- مراحل ثبت نام&nbsp;&nbsp;</strong></span></div>
<?php
}
?>
</td>
</tr>
<!-- middle_content -->
<?php
include("includes/signup.class.php");
include("includes/misc.class.php");
$signup=new signup;
$misc=new misc;
?>
<SCRIPT language="JavaScript">
<?php
include("includes/script.inc");
?>
</script>
<?php
$country_id=$HTTP_POST_VARS["country"];
$email=$HTTP_POST_VARS["email"];
if(strpos(strtolower($email),"script")>0)
{
$invalid=0;
}
else
{
$invalid=1;
}
$first_name=$HTTP_POST_VARS["first_name"];
if(strpos(strtolower($first_name),"script")>0)
{
$invalid=0;
}
else
{
if($invalid!=0)
{
$invalid=1;
}
}
$last_name=$HTTP_POST_VARS["last_name"];
if(strpos(strtolower($last_name),"script")>0)
{
$invalid=0;
}
else
{
if($invalid!=0)
{
$invalid=1;
}
}
$password=addslashes($HTTP_POST_VARS["password"]);
if(strpos(strtolower($password),"script")>0)
{
if($invalid!=0)
{
$invalid=0;
}
}
else
{
if($invalid!=0)
{
$invalid=1;
}
}
$city=$HTTP_POST_VARS["city"];
if(strpos(strtolower($city),"script")>0)
{
$invalid=0;
}
else
{
if($invalid!=0)
{
$invalid=1;
}
}
$state=$HTTP_POST_VARS["us_state"];
if(strpos(strtolower($state),"script")>0)
{
$invalid=0;
}
else
{
if($invalid!=0)
{
$invalid=1;
}
}
$other_state=$HTTP_POST_VARS["other_state"];
if(strpos(strtolower($other_state),"script")>0)
{
$invalid=0;
}
else
{
if($invalid!=0)
{
$invalid=1;
}
}
if($state=="0")
{
$state=$other_state;
}
$postal_code=$HTTP_POST_VARS["postal_code"];
if(strpos(strtolower($postal_code),"script")>0)
{
$invalid=0;
}
else
{
if($invalid!=0)
{
$invalid=1;
}
}
$gender=$HTTP_POST_VARS["gender"];
if(strpos(strtolower($gender),"script")>0)
{
$invalid=0;
}
else
{
if($invalid!=0)
{
$invalid=1;
}
}
$month=$HTTP_POST_VARS["month"];
$day=$HTTP_POST_VARS["day"];
$year=$HTTP_POST_VARS["year"];
$package=$HTTP_POST_VARS["package"];
$here_for1=$HTTP_POST_VARS["here_for"];
$here_for='';
$sr_no=0;
if($here_for1!=Null)
{
foreach($here_for1 as $aa)
{
if($sr_no==0)
{
$here_for=$aa;
}
else
{
$here_for=$here_for.",".$aa;
}
$sr_no=$sr_no+1;
}
}
if($invalid==0)
{
?>
<form name='send_back' action='join_us.php?country_id="<?php echo $country_id;?>"&err=4' method='post'>
<input type='hidden' name='email' value='<?php echo ($email);?>'>
<input type='hidden' name='first_name' value='<?php echo ($first_name);?>'>
<input type='hidden' name='last_name' value='<?php echo ($last_name);?>'>
<input type='hidden' name='state' value='<?php echo ($state);?>'>
<input type='hidden' name='city' value='<?php echo ($city);?>'>
<input type='hidden' name='other_state' value='<?php echo ($other_state);?>'>
<input type='hidden' name='postal_code' value='<?php echo ($postal_code);?>'>
<input type='hidden' name='gender' value='<?php echo ($gender);?>'>
<input type='hidden' name='month' value='<?php echo ($month);?>'>
<input type='hidden' name='day' value='<?php echo ($day);?>'>
<input type='hidden' name='year' value='<?php echo ($year);?>'>
</form>
<script language='JavaScript'>
document.send_back.submit();
</script>
<?php
}
else
{
if ($email==Null||$first_name==Null||$last_name==Null ||$password==Null||$state==Null||$postal_code==Nul l||$gender==Null||$_SESSION["confirm_number"]==$HTTP_POST_VARS["entered_number"])
{
if($_SESSION["confirm_number"]==$HTTP_POST_VARS["entered_number"])
{
?>
<form name='send_back' action="join_us.php?country_id=<?php echo $country_id?>&err=3" method='post'>
<?php
}
else
{
?>
<form name='send_back' action="join_us.php?country_id=<?php echo $country_id?>&err=1" method='post'>
<?php
}
?>
<input type='hidden' name='email' value='<?php echo ($email);?>'>
<input type='hidden' name='first_name' value='<?php echo ($first_name);?>'>
<input type='hidden' name='last_name' value='<?php echo ($last_name);?>'>
<input type='hidden' name='state' value='<?php echo ($state);?>'>
<input type='hidden' name='city' value='<?php echo ($city);?>'>
<input type='hidden' name='other_state' value='<?php echo ($other_state);?>'>
<input type='hidden' name='postal_code' value='<?php echo ($postal_code);?>'>
<input type='hidden' name='gender' value='<?php echo ($gender);?>'>
<input type='hidden' name='month' value='<?php echo ($month);?>'>
<input type='hidden' name='day' value='<?php echo ($day);?>'>
<input type='hidden' name='year' value='<?php echo ($year);?>'>
</form>
<script language='JavaScript'>
document.send_back.submit();
</script>
<?php
}
else
{
$num_rows=$signup->check_email($email);
if($num_rows==1)
{
// send user back
?>
<form name='send_back' action='join_us.php?country_id=<?php echo ($country_id);?>&err=2' method='post'>
<input type='hidden' name='email' value='<?php echo ($email);?>'>
<input type='hidden' name='first_name' value='<?php echo ($first_name);?>'>
<input type='hidden' name='last_name' value='<?php echo ($last_name);?>'>
<input type='hidden' name='state' value='<?php echo ($state);?>'>
<input type='hidden' name='city' value='<?php echo ($city);?>'>
<input type='hidden' name='postal_code' value='<?php echo ($postal_code);?>'>
<input type='hidden' name='gender' value='<?php echo ($gender);?>'>
<input type='hidden' name='month' value='<?php echo ($month);?>'>
<input type='hidden' name='day' value='<?php echo ($day);?>'>
<input type='hidden' name='year' value='<?php echo ($year);?>'>
</form>
<script language='JavaScript'>
document.send_back.submit();
</script>
<?php
// send user back
}
else
{
$dob=$year."-".$month."-".$day;
$country=$misc->get_countryname($country_id);
$new_password=$password;


$password=md5($password);


// add user to database
include("includes/packages.class.php");
$pack = new packages;
$pack_set=$pack->get_pack($package);
//if($pack_set["price"]==0.0)
//{
$res=$signup->step1($package,$country_id, $email, $first_name,$last_name,$password,$city,$state,$pos tal_code,$gender,$dob, $month,$day,$year,$here_for);
//}
//else
//{
//$res=$signup->step_paid($package,$country_id, $email, $first_name,$last_name,$password,$city,$state,$pos tal_code,$gender,$dob, $month,$day,$year,$here_for);
//}
// add user to database
if($res!=0)
{
include("includes/profile.class.php");
$profile=new profile;
$friend_id=$profile->get_default_friend();
$friend_res=$profile->add_default_friend($friend_id,$res);
$date_posted=date("m-d-Y g:i:s");
$sql="insert into messages";
$sql.="(mess_by";
$sql.=", mess_to";
$sql.=", mess_text";
$sql.=", subject";
$sql.=", deleted";
$sql.=", date_posted";
$sql.=", mess_read)";
$sql.=" values($friend_id";
$sql.=", $res";
$sql.=", 'Thank you for joining $site_name, Please enjoy contacting hundreds of your fellow $site_name members worldwide. Have a great week.<br>Regards,<br>$site_name Management'";
$sql.=", 'Welcome to $site_name'";
$sql.=", 0";
$sql.=", '$date_posted'";
$sql.=", 0)";
$result1=mysql_query($sql);
print mysql_error();


// Send Verification Email
$user_id=$res;
$verify_code=1234*$user_id;
$send=$signup->send_verification_email($first_name, $email,$new_password,$verify_code,$email_name,$sit e_email,$site_name, $site_url);
// Send Verification Email
// show them next step
$_SESSION["logged_in"]="yes";
$_SESSION["member_id"]=$user_id;
$_SESSION["member_name"]=$first_name;
$_SESSION["member_lname"]=$last_name;
$_SESSION["member_email"]=$email;
$_SESSION["member_password"]=$password;
$_SESSION["package"]=2;
$_SESSION["selected_package"]=2;
$_SESSION["enabled"]=0;
$id=2;
$allowed_info=$pack->get_pack_value($id,'Search');
if($allowed_info["id"]!=Null)
{
$_SESSION["search_allowed"]="yes";
}
$allowed_info=$pack->get_pack_value($id,'Invite');
if($allowed_info["id"]!=Null)
{
$_SESSION["invite_allowed"]="yes";
}
$allowed_info=$pack->get_pack_value($id,'Forum');
if($allowed_info["id"]!=Null)
{
$_SESSION["forum_allowed"]="yes";
}
$allowed_info=$pack->get_pack_value($id,'Groups');
if($allowed_info["id"]!=Null)
{
$_SESSION["groups_allowed"]="yes";
}


$allowed_info=$pack->get_pack_value($id,'Events');
if($allowed_info["id"]!=Null)
{
$_SESSION["events_allowed"]="yes";
}
$allowed_info=$pack->get_pack_value($id,'Mails');
if($allowed_info["id"]!=Null)
{
$_SESSION["mails_allowed"]="yes";
}
$allowed_info=$pack->get_pack_value($id,'Journal');
if($allowed_info["id"]!=Null)
{
$_SESSION["journal_allowed"]="yes";
}


$allowed_info=$pack->get_pack_value($id,'Address Book');
if($allowed_info["id"]!=Null)
{
$_SESSION["address_allowed"]="yes";
}
$allowed_info=$pack->get_pack_value($id,'Blogs');
if($allowed_info["id"]!=Null)
{
$_SESSION["blog_allowed"]="yes";
}
$allowed_info=$pack->get_pack_value($id,'Classified');
if($allowed_info["id"]!=Null)
{
$_SESSION["classified_allowed"]="yes";
}
$allowed_info=$pack->get_pack_value($id,'Music');
if($allowed_info["id"]!=Null)
{
$_SESSION["music_allowed"]="yes";
}
$allowed_info=$pack->get_pack_value($id,'Videos');
if($allowed_info["id"]!=Null)
{
$_SESSION["videos_allowed"]="yes";
}


$posted_on=date("m/d/Y");
$ip_address=$_SERVER['REMOTE_ADDR'];
$sql="update members set last_login = '$posted_on', last_ip = '$ip_address' where member_id = $_SESSION[member_id]";
$upd=mysql_query($sql);


print "<form name='UploadImages' action='upload_new_photo1.php?user_id=$user_id' ENCTYPE='multipart/form-data' method='post'>";
?>
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td class='txt_label' height="30" colspan="2">
<strong>ارسال عکس</strong>
</td>
</tr>
<tr>
<td width="100%" colspan='2' class='txt_label'>
.<br>
.<br>
.<br>
.<br>
</td>
</tr>
<tr>
<td width="194" class='txt_label'>
Select Photo:</td>
<td width="346" height="30">
<input type='file' size='40' name='image'>
</td>
</tr>
<!-- Main State Code -->


<tr>
<td height="30" class='style9' colspan="2"><div align="center">
<input class='txt_topic' type="submit" name="Submit" value="Submit">
<input class='txt_topic' style="WIDTH: 80px" onclick="document.location.href='invite.php?new=1';return false;" type=button value="Skip For Now" name=btnreg>
</div></td>
</tr>
<?php
// show them next step
}
}
}
}
?>
</table>
</form>
</td></tr>
</table>
<!-- middle_content -->
</td>
<td width='20%' valign='top'>
<!-- ad code -->
<?php
$ads_set = $ads->get_top_160_banner();
$upd = $ads->update_impr($ads_set["campaign_id"]);


if($ads_set["banner_code"]!=Null)
{
?>
<?php echo stripslashes($ads_set["banner_code"])?>
<?php
}
else
{
if($ads_set["banner_type"] == 2)
{
?>
<a href='track_ad_link.php?campaign_id=<?php echo $ads_set["campaign_id"]?>&url=<?php echo $ads_set["banner_url"]?>' target='_blank'>
<img src='<?php echo $ads_set["banner_file"]?>' width='160' height='600' border='0'/>
</a>
<?php
}
if($ads_set["banner_type"] == 3)
{
?>
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0','width','160','height ','600','id','banner','align','','src','<?php echo $ads_set["banner_file"]?>?clickTAG=track_ad_link.php?campaign_id=<?php echo $ads_set["campaign_id"]?>&url=<?php echo $ads_set["banner_url"]?>','quality','high','bgcolor','#FFFFFF','name','ban ner','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','<?php echo $ads_set["banner_file"]?>?clickTAG=track_ad_link.php?campaign_id=<?php echo $ads_set["campaign_id"]?>&url=<?php echo $ads_set["banner_url"]?>' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="160" height="600" id="banner" ALIGN="">
<PARAM NAME=movie VALUE="<?php echo $ads_set["banner_file"]?>?clickTAG=track_ad_link.php?campaign_id=<?php echo $ads_set["campaign_id"]?>&url=<?php echo $ads_set["banner_url"]?>">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="<?php echo $ads_set["banner_file"]?>?clickTAG=track_ad_link.php?campaign_id=<?php echo $ads_set["campaign_id"]?>&url=<?php echo $ads_set["banner_url"]?>" quality=high bgcolor=#FFFFFF WIDTH="160" HEIGHT="600" NAME="banner" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT></noscript>
<?php
}
}
?>
<!-- ad code -->
</td>
</tr>
</table>


<!-- Middle Text -->
<?php
include("includes/bottom.php");
?>