Jump to content

mboley370

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mboley370's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The center of the search box wont line up in the middle in IE, but will perfectly in Firefox and Chrome. Is there a way to define the form height and center it within the cell? <form name="search_form" id="search_form" action="index.php" method="get" padding-left:0px;"> <td width="100" background="../menu buttons/input_bg.png"> <input type="text" border: 0px class="input-text" name="tag" id="tag" value="" style="width: 100px; background-position: -14px 0px; height:37px; padding-left:0px;"> </td> <td width="63" background="../menu buttons/input_bg.png"><input type="submit" class="input-button" value="Search" style=" width: 60px; height:36px;" /></td></form> CSS .input-text{color:#111144; font-family:arial,tahoma,verdana; font-size:8pt; font-weight:bold; background:url(images/search_bg.png) #FFFFFF; border:0px solid #989898;} .input-button{color:#FFFFFF; font-family:arial,tahoma,verdana; font-size:8pt; background:url(images/search_button_bg.png);
  2. Put them into a table <table align"something here" cellpadding="0" cellspacing="0" border="0" bordercolor="#something if you want"> <tr> <td> the first here </td> <td> the second here</td> </table>
  3. Here is what i have and it works for me. I hope this helps you. / Check database to see if username and the password exist there. $query = "SELECT staffMemberID, smFirstName "; $query .= "FROM staffMember "; $query .= "WHERE smEmail = '{$email}' "; $query .= "AND smPassword = '{$password}' "; $query .= "LIMIT 1"; $result_set = mysql_query($query); confirm_query($result_set); if (mysql_num_rows($result_set) == 1) { $found_user = mysql_fetch_array($result_set); $_SESSION['logged_in'] = "yes"; $_SESSION['firstName'] = $found_user['smFirstName']; $_SESSION['staffMemberID'] = $found_user['staffMemberID']; redirect_to("staffArea.php"); } else { $message = "Email / Password combination incorrect.<br /> Please make sure your caps lock key is off and try again."; } }
  4. I understand now. I didn't know that. I did however see that no matter what it updated the table every time with the same data that is why i was getting a lot of rows returned even if it was the same data. Thanks you saved me a lot of time trying to figure this out. Matt
  5. This can be done, but I would think this through a little. What happens if there is a second customer. You need to have a way to check to make sure that the directory that you want to create doesn't exist first. I found a quick example for you here http://www.daniweb.com/forums/thread115915.html This would have to be edited so that you can tell it to create a directory name $PersonsName = ['nameFieldEntered"] so mkdir($PersonsName) $uploaddir1 = "resumes/".$_SESSION["uss1"]."/".$uname; echo $uploaddir1; if(is_dir($uploaddir1)) { echo "Exists!"; } else { echo "Doesn't exist" ; mkdir($uploaddir1,0777); print "created"; } Whith that being said I would then do a check. Such as above check again if the file was created. If the file was created. Run a sql insert kind of like this. So that you can run a check to insert into your table you would have to do something like this $name = ['nameFieldEntered'] // The namefieldEntered is obviously going to be your directory name. $file1 = The file you want to insert $file2 = the file you want to insert if(is_dir($name)) { $query "insert $file1, $file2 into $name"; I hope this helps a little. Just let me know.
  6. So i have checked all over google and I can' find anything that works the same as mysql_num_rows. I tried oci_num_rows but it just doesn't work the same. The code below worked in mysql, it works and updates now in oracle, however. The part below where it compares how many rows are being used won't work anymore. It just shows up as updated every time. I am only looking for the rows that have changed. If my staff member doesn't update anything I have it show up and say. " You profile hasn't changed nothing was updated" if ($rowsAffected == 0) This is the part here that I can't get to work properly which is down below as you can see. Do i need to use some kind of count. Could someone give an example please. f($error==0){ $updateQuery = "UPDATE staffMember SET smFirstName = '$smFirstName', smLastName = '$smLastName', smPhone = '$smPhone', smAddress = '$smAddress', smCity = '$smCity', smState = '$smState', smZip = '$smZip', smEmail = '$smEmail', smExperience = '$smExperience', smEducation = '$smEducation', smSchool = '$smSchool', smCertification = '$smCertification', smAvailability = '$smAvailability', smStatus = '$smStatus', smTravel = '$smTravel', smSalary = '$smSalary', smEmployer = '$smEmployer', smPositionType = '$smPositionType', smYearsWorked = '$smYearsWorked', smSkills = '$smSkills', smHobbies = '$smHobbies', smProfileImage = '$smProfile_Image', smUploadResume = '$smUpload_Resume', smPassword = '$smPassword' WHERE staffMemberId = '{$staffID}'"; //$result = mysql_query($updateQuery); //confirm_query($result); $result = oci_parse($conn, "$updateQuery"); oci_execute($result); $rowsAffected = oci_num_rows($result); if ($rowsAffected == 0) { redirect_to("staffArea.php?update=2"); } else if ($rowsAffected != -1) { redirect_to("staffArea.php?update=1"); } else { $message .= "Error occurred while updating database. Please try again."; } }
  7. Its just using my error I have setup which would be this. Sorry but you must be logged in to view that page It says this, because it uses this in the next page to load the page. It makes sure that the users is logged in. At the top before anything it makes sure with a funciton that points to this code. function staff_confirm_logged_in() { if (!staffLogged_in()) { redirect_to("staffLogin.php?error=1"); } The error jumps back to my staffLogin.php page where it spits out the error for error=1 which is error Sorry but you must be logged in to view that page So its getting to the next page, but failing to use sessions and I tested this because if i edit out the sessions on the next page and to check if my user is logged in. I get to the next page. Without commenting anything about sessions it shows me the error that i am not logged in.
  8. The script will find the data in my database. If i comment out userSession on the next page that the script below will go to it works fine. However that means there is something wrong with the area below when its assigning variables to my session. I am not sure whats going on, but my sessions aren't working. This is my first test ever on an wamp server using oracle enterprise 11g on a Windows Vista. What am i doing wrong? The code below <?php require_once("includes/userSession.php"); ?> <?php require_once("includes/connection.php"); ?> <?php require_once("includes/functions.php"); ?> <?php if (staffLogged_in()) { redirect_to("staffArea.php"); } $message=""; //check to see if submit button was pressed if (isset($_POST['submit']) || isset($_POST['submit_x'])) { // Form has been submitted. //check to see if fields are not empty if($_POST['email'] =="" || $_POST['password'] ==""){ $message = "Please fill in both fields."; } else { //I used addslashes instead of mySQLprep from function.php since oracle won't support it. //Will probably move to stripslashes then post my variables below that //$email = trim(addslashes($_POST['email'])); $email = ($_POST['email']); $password =($_POST['password']); //$password = trim(addslashes($_POST['password'])); // Check database to see if username and the password exist there. //$query = "SELECT staffMemberID, smFirstName "; //$query .= "FROM staffMember "; //$query .= "WHERE smEmail = '{$email}' "; //$query .= "AND smPassword = '{$password}' "; //$query .= "LIMIT 1"; // Oracle wont support limit 1 $query = "SELECT staffMemberID, smFirstName FROM staffMember WHERE smEmail = '{$email}' AND smPassword = '{$password}'"; //$query = "select staffMemberID, smFirstName from staffMember"; $result_set = oci_parse($conn, $query); oci_execute($result_set); confirm_query($result_set); // there was mysql_num_row which is returns the number of rows in a result. I tried oci_num_rows but got many errors if (oci_fetch($result_set)==1) { $found_user = oci_fetch_array($result_set, OCI_ASSOC+OCI_RETURN_NULLS); //set session variables if user found $_SESSION['logged_in'] = "yes"; $_SESSION['firstName'] = $found_user['smFirstName']; $_SESSION['staffMemberID'] = $found_user['staffMemberID']; redirect_to("staffArea.php"); } else { $message = "Email / Password combination incorrect.<br /> Please make sure your caps lock key is off and try again."; } } } else { // Form has not been submitted. if (isset($_GET['logout']) && $_GET['logout'] == 1) { $message = "You are now logged out."; } if (isset($_GET['error']) && $_GET['error'] == 1) { $message = "Sorry but you must be logged in to view that page."; } $email = ""; $password = ""; } ?> The code below is for my sessionUser Page that the above script links to for its session commands. The function staff_confirm_logged_in() is where my codes getting caught at. I get the error associated with that function below every time if i don't comment out my session going to the next page. <?php session_start(); function staffLogged_in(){ if(isset($_SESSION['staffMemberID']) && ($_SESSION['logged_in'] =="yes") && isset($_SESSION['firstName'])){ return true; } else { return false; } } function staff_confirm_logged_in() { if (!staffLogged_in()) { redirect_to("staffLogin.php?error=1"); } } ?>
  9. Thanks I guess I overlooked this part, i thought i was putting the validation before the submit, but I just looked at the staffRequestValidate.php and its right at the top lol. I thought i was going crazy and just couldn't find it. Thanks for the fast response.
  10. I am trying to alter a page my teammate made for our Senior Project Class so that it doesn't ask us to validate the radio buttons. It seems like not matter what I take out it still validates the buttons. What do i need to take out of this code? I am very new with php, but understand how to use it to a certain extent. <?php require_once("../includes/userSession.php"); ?> <?php require_once("../includes/connection.php"); ?> <?php require_once("../includes/functions.php"); ?> <?php manager_confirm_logged_in(); ?> <?php $message = ""; $found="true"; $numRows =0; $errors=0; $managerID = $_SESSION['contractManagerID']; $srID = ""; if(isset($_GET['requestID'])){ $srID = $_GET['requestID']; $query = "SELECT sr.clientID, cFirstName, cLastName, candidateRequestedID, srStatus, srClosed, srDate, srValid, sr.* "; $query .="FROM staffRequest AS sr, client AS c "; $query .="WHERE staffRequestID =".$_GET['requestID']." AND c.clientID = sr.clientID"; $result_set = mysql_query($query); confirm_query($result_set); if (mysql_num_rows($result_set) == 1) { $srRecord = mysql_fetch_array($result_set); }else{ $message = "There is no staff request with the staff request ID entered. Please go back and try again."; //redirect_to('clientArea.php?searchError=1'); $found = "false"; } }else{ $message = "Error: No Staff Request ID sent. Please go back to the manager area and try again."; $found = "false"; } if(isset($_GET['error']) && $_GET['error'] == 1 ){ $message = "You must select one candidate in order to close the staff request."; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>TPS -Validate Staff Request </title> <link href="../styles.css" rel="stylesheet" type="text/css" /> <script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style1 { color: #000000; font-size: 24px; font-weight: bold; } --> </style> </head> <body> <div id="mainContent" align="center"> <div id="header"> <div id="headerImg" align="left"><a href="../index.html"><img src="../images/tps_logo.png" width="226" height="67" border="opx" alt="Taylor Professional Services" /></a></div> </div> <div id="nav"> <ul id="MenuBar1" class="MenuBarHorizontal"> <li><a href="../aboutUs.html">About Us</a> </li> <li><a href="../services.html">Services</a></li> <li><a href="../clientLogin.php">Client Login</a></li> <li><a href="../staffLogin.php">Staff Login</a></li> <li><a href="../contactUs.html">Contact Us</a></li> <li><a href="managerLogout.php">Log Out</a></li> </ul> <script type="text/javascript"> <!-- var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"}); //--> </script> </div> <div id="content"> <form action="staffRequestValidate.php" method="post"> <div align="left" style="padding:10px"><a class="backLinks" href="managerArea.php"><< Back to Manager Area page.</a></div> <?php if (!empty($message) || ($message != "")) {echo "<div align=\"center\"><span class=\"errorMessage\">*** ".$message." ***</span></div>"; } ?> <div class="managerSections"> <div class="greyBG">Validate Staff Request <?php echo $srID; ?></div> <p><br /> <?php if( $srRecord['srValid'] == "Invalid"): ?> <?php if($found == "true") : ?> The status of this staff request is that it is: <b><?php echo $srRecord['srStatus']; ?></b><br /> <br /> The client's name is: <b><?php echo $srRecord['cFirstName']." ".$srRecord['cLastName']; ?></b><br /> </p> <table> <tr><td colspan="4" align="center"><h3 align="left">Clients Specifications </h3></td> </tr> <tr> <td width="150px">Education</td> <td width="120px">Experience</td> <td width="100px">Location</td> <td width="100px">Salary</td> </tr> <tr> <td><b><?php echo $srRecord['srEducation']; ?> Degree</b></td> <td><b><?php echo $srRecord['srExperience']; ?> years</b></td> <td><b><?php echo $srRecord['srLocation']; ?></b></td> <td><b><?php echo $srRecord['srSalary']; ?> </b></td> </tr> </table> <p><br /> The date this request was submitted: <b><?php echo substr($srRecord['srDate'],0,10); ?></b><br /> <br /> Select the candidate they chose for this staff request <p> <?php $query2 = "SELECT * FROM candidatesRequested WHERE candidatesRequestedID =".$srRecord['candidateRequestedID']; $result_set2 = mysql_query($query2); confirm_query($result_set2); if (mysql_num_rows($result_set2) == 1) { $candidates = mysql_fetch_array($result_set2); $query3 = "SELECT staffMemberId, smFirstName, smLastName FROM staffMember "; $query3 .= "WHERE staffMemberId IN (".$candidates['crCandidate1'].", ".$candidates['crCandidate2'].", ".$candidates['crCandidate3'].")"; $result_set3 = mysql_query($query3); confirm_query($result_set3); echo "<table cellpadding=\"3px\">"; echo "<TR>"; echo "<TH>First Name</TH><TH>Last Name</TH>"; echo "</TR>"; while($staffMember = mysql_fetch_array($result_set3)) { echo "<TR>"; echo "<TD>", $staffMember['smFirstName'], "</TD><TD>", $staffMember['smLastName'], "</TD>"; echo "</TR>"; } echo "</TABLE>"; }else{ echo "An error occurred while trying to retrieve candidates. Please email support about this problem."; } ?> <?php endif; ?> </p> <br> <table width="316" border="0"> <tr><td colspan="2" align="center"><h3 align="left">Validate Staff Request </h3></td> </tr> <tr> <th width="122" scope="row"><div align="right"><strong>Valid:</strong> </div></th> <td width="184"> <div align="left"> <input name="srValidRadio" type="radio" value="Valid" /> </div> </label></td> </tr> <tr> <th scope="row"><div align="right"><strong>Invalid:</strong> </div></th> <td><div align="left"> <input name="srValidRadio" type="radio" value="InValid" /> </div></td> </tr> <tr> <th scope="row"><div align="right"><strong>Unable To Fill:</strong> </div></th> <td><div align="left"> <input name="srValidRadio" type="radio" value="Unable to fill" /> </div></td> </tr> </table> <p><br /> <br /> <input name="clientID" type="hidden" value="<?php echo $srRecord['clientID']; ?>" /> <input name="staffRequestID" type="hidden" value="<?php echo $srID; ?>" /> <input name="submit" type="submit" value="Validate Staff Request" /><?php else : echo "<b>Staff request ".$srID." is already valid. </b>"; ?> <?php endif; ?> </p> </form> </div> <br /> <br /> </div> <div id="footer"> <table width="800px" align="center"cellpadding="1px;"> <tr> <td><a href="../index.html">Home</a></td> <td>|</td> <td><a href="../aboutUs.html">About Us</a></td> <td>|</td> <td><a href="../services.html">Services</a></td> <td>|</td> <td><a href="../clientLogin.php">Client Login</a></td> <td>|</td> <td><a href="../staffLogin.php">Staff Login</a></td> <td>|</td> <td><a href="../contactUs.html">Contact Us</a></td> <td>|</td> <td><a href="clientLogout.php">Log Out</a></td> <td align="right" width="350px">© 2010 Taylor Professional Services</td> </tr> </table> </div> </body> </html> <?php /* <table cellspacing="5px"> <tr><td><b>Education:</b></td><td><?php echo $srRecord['srEducation']; ?> Degree</td></tr> <tr><td><b>Experience:</b></td><td><?php echo $srRecord['srExperience']; ?> years</td></tr> <tr><td><b>Location:</b></td><td><?php echo $srRecord['srLocation']; ?></td></tr> <tr><td><b>Salary:</b></td><td><?php echo $srRecord['srSalary']; ?> </td></tr></table> */ ?>
  11. Some more info to better explain the problem. When get sources/videos it automaticly creates names for the categories. However its creating only 1 category name. It is creating about 24-25 for others with the same script. Could this have anything to do with my .htaccess? I am confused lol. Thanks Matt
  12. A little about the script. The script is pretty much like a clone tube site or soemthing along these lines. It pulls flv files from difffernt sites and stores them into categories for me. The problem: It isn't storing them into the categories for me its putting all of the flv fiiles under uncategorized. Am a pretty much a noobie at php, where could i start to look for a problem? However it is working for everyone else but me. The owner of the script even checked it out for me and can't see a problem. He said he will have to get back with me. Thanks in advance for any help this is driving me crazy lol. Matt
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.