Jump to content

rcampos39

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About rcampos39

  • Rank
    Newbie
  • Birthday 01/15/1975

Profile Information

  • Location
    Washington, DC
  1. It Queries the database for the email the the registrant used, if th eemail exists they get discounted prices if it doesnt they get full price. Then $semattend uses that query result to be used in the code above. I think the queary may be wrong. this is what that looks like. $query1 = "SELECT 'email' FROM management WHERE 'email' LIKE '$email'"; $total1 = mysqli_num_rows(connection, $query1);$semattend = ($total1 > 0)?'MEMBER-ATTENDED':'MEMBER-NOTATTENDED'; //member found or not found
  2. Here are the notices that I get. Notice: Undefined variable: semattend in /var/www/html/www4.aacrao.org/sem-ep/fees.php on line 3Notice: Undefined variable: semattend in /var/www/html/www4.aacrao.org/sem-ep/fees.php on line 17Notice: Undefined variable: semattend in /var/www/html/www4.aacrao.org/sem-ep/fees.php on line 31Notice: Undefined variable: semattend in /var/www/html/www4.aacrao.org/sem-ep/fees.php on line 45Notice: Undefined variable: total in /var/www/html/www4.aacrao.org/sem-ep/fees.php on line 61
  3. This app was created over 4 years ago and its not my code. I inhareted this app when I came into a new position with the company im working with and I just want to make it work, then I will revamp the look and feel as well.
  4. If the registrant is not a member, the total wont show up and I get undefined variable for $total and $semattend.
  5. If the registrant is not a member, the total wont show up and I get undefined variable for $total and $semattend.
  6. I am fairly new to PHP and I was tasked with migrading an app that runs on php 4+ enviroment into a 5.4 enviroment and I am getting warnings becasue its very old code, but I also would lie to know if there is a better way of writing the fallowing script of php code. It checks weather a member has attended a course and if so it charges a price if not its a different price and so on. Any help would be very appriciated. <?phpif ($semattend == 'MEMBER-ATTENDED') {$total = "<tr> <td height="30" align="right"><p><font color="#FF9900">*</font><font size="2">Total: </font></p></td> <td height="30" colspan="3" align="left"><font size="2"><input type="hidden" id = "amount" value="1299" name="amount" size="28">$1,299</font></td> </tr> <tr> <td colspan="3" align="left"><p>Search results indicate that you belong to a member instituion and have completed the Essentials of SEM course</p></td> </tr> <input type="hidden" id = "semstatus" value="MEMBER-ATTENDED" name=semstatus"> <input type="hidden" id = "attended" value="Attended Course" name="attended"> <input type="hidden" id = "member" value="Member" name="member">";} elseif ($semattend == 'MEMBER-NOTATTENDED') {$total = "<tr> <td height="30" align="right"><p><font color="#FF9900">*</font><font size="2">Total: </font></p></td> <td height="30" colspan="3" align="left"><font size="2"><input type="hidden" id = "amount" value="1799" name="amount" size="28">$1,799</font></td> </tr> <tr> <td colspan="3" align="left"><p>Search results indicate that you belong to a member instituion and have not completed the Essentials of SEM course</p></td> </tr> <input type="hidden" id = "semstatus" value="MEMBER-NOTATTENDED" name=semstatus"> <input type="hidden" id = "attended" value="Not Attended Course" name="attended"> <input type="hidden" id = "member" value="Member" name="member">"; } elseif ($semattend == 'NONMEMBER-ATTENDED') {$total = "<tr> <td height="30" align="right"><p><font color="#FF9900">*</font><font size="2">Total: </font></p></td> <td height="30" colspan="3" align="left"><font size="2"><input type="hidden" id = "amount" value="1599" name="amount" size="28">$1,599</font></td> </tr> <tr> <td colspan="3" align="left"><p>Search results indicate that you do not belong to a member instituion and have completed the Essentials of SEM course</p></td> </tr> <input type="hidden" id = "semstatus" value="NONMEMBER-ATTENDED" name=semstatus"> <input type="hidden" id = "attended" value="Attended Course" name="attended"> <input type="hidden" id = "member" value="Non Member" name="member">"; } elseif ($semattend == 'NONMEMBER-NOTATTENDED') {$total = "<tr> <td height="30" align="right"><p><font color="#FF9900">*</font><font size="2">Total: </font></p></td> <td height="30" colspan="3" align="left"><font size="2"><input type="hidden" id = "amount" value="2099" name="amount" size="28">$2,099</font></td> </tr> <tr> <td colspan="3" align="left"><p>Search results indicate that you do not belong to a member instituion and have not completed the Essentials of SEM course</p></td> </tr> <input type="hidden" id = "semstatus" value="NONMEMBER-NOTATTENDED" name=semstatus"> <input type="hidden" id = "attended" value="Not Attended Course" name="attended"> <input type="hidden" id = "member" value="Non Member" name="member">"; }echo $total;?>
×
×
  • Create New...