here is the error that i could not find kindly help me | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

here is the error that i could not find kindly help me

if($reg['reg_type']=='Free'){ echo "<h4>Few features are locked for Free members. Please pay via Bank Draft or easypaisa for premium membership and enjoy premium features.</h4>"; } ?> <a href="AddEducation.php">Add Educational Information</a><br> //line number 72// <?php if($reg['reg_type']=='Premium' && $reg['payment_status']=='paid'){ ?> <a href="AddExperinece.php">Add Experience Information</a><br> <a href="AddSkills.php">Add Skills Information</a><br> Error <Notice: Undefined index: payment_status in C:\xampp\htdocs\jobsphp\index.php on line 72>

25th Nov 2017, 11:28 AM
Ajmal Khan
Ajmal Khan - avatar
4 Antworten
+ 1
It's not possible to answer with this code. It's necessary to know what $reg contains. Index payment_status don't exist in $reg
25th Nov 2017, 11:44 AM
S K Lurk //\●●/\\
S K Lurk //\●●/\\ - avatar
0
<?php if(isset($_GET['registration']) && $_GET['registration']=='successful'){ echo '<script>alert("registration successful...");</script>'; } if(isset($_SESSION['employee'])) { if(isset($_GET['app']) && $_GET['app']=='true'){ echo "<script>alert('You Applied Successfully for this job.')</script>"; } if(isset($_GET['record'])=='saved'){ echo "<script>alert('Record Successfully Saved')</script>"; } $query= "select reg_type from employees where ee_id=".$_SESSION['cu_id']; $res=mysql_query($q,$link) or die ("can not select database"); $result = mysql_query($query,$link) or die(mysql_error()); $reg = mysql_fetch_array($result); if($reg['reg_type']=='Free'){ echo "<h4>Few features are locked for Free members. Please pay via Bank Draft or easypaisa for premium membership and enjoy premium features.</h4>"; } ?> <a href="AddEducation.php">Add Educational Information</a><br> <?php if($reg['reg_type']=='Premium' && $reg['payment_status']=='paid'){ ?> <a href="AddExperinece.php">Add Experience Information</a><br> <a href="AddSkills.php">Add Skills Information</a><br> <?php } ?> <a href="AddSpokenLanguges.php">Add Spoken Languages Information</a><br> <a href="MyApplications.php">View Applications</a><br> <a href="MyProfile.php">My Profile</a><br>
25th Nov 2017, 12:47 PM
Ajmal Khan
Ajmal Khan - avatar
0
you get only reg_type in your SQL query. So payment_status is undefined.
25th Nov 2017, 12:50 PM
S K Lurk //\●●/\\
S K Lurk //\●●/\\ - avatar
0
how can i solve this issue
25th Nov 2017, 12:57 PM
Ajmal Khan
Ajmal Khan - avatar