Jump to content

SalientAnimal

Members
  • Posts

    366
  • Joined

  • Last visited

Everything posted by SalientAnimal

  1. Thanks again Jacques, I'm going to get cracking on trying to get this to work. I am assuming that with this solution each user would only appear in the activity table once? Once I have the heartbeat up and running, the next thing I want to achieve, is to use this as a tracking system to see when a user logs in / out on a daily basis and use it as a register. Would you recommend using the same table to track this information? Or should I then look at doing this in a completely separate table? I was thinking of possibly creating a view and updating it daily with the first login event of a day, and last logout event.
  2. Gizmola, I have two questions: How do I know if my webhost will support websockets to perform this function? If I decide to run my site as an intranet, how would I gain access to the websockets? I'm looking for a solution that it rather easy to implement and understand, but from what I have read thus far I am left scratching my head... Thanks
  3. You need to grab the user's id from your session data and add it to your url. It appears as if you are assigning the user to the id variable, instead of assigning the id variable to id. affiliate-profile.php?id=$id
  4. Based on what you have said Jacques, would it be correct in assuming that you could use the Ajax heartbeat as an activity status, i.e. online, away, offline. The HTTP request, would be on every single page and would therefore only update if and when some sort of link is clicked on the page? So based on this I would have a table with a structure such as memberID, activity_status, heartbeat, last_active The columns will function as follows: activity_status - HTTP request timestamp, heartbeat - Ajax request timestamp, last_active - the time of the logout request. How will it identify if a user goes offline? The HTTP request will only update when a request is sent, but what happens if JavaScript is blocked and the user simply closes the browser? What are your thoughts? Any idea where I could read up on a good tutorial for implementing what you have mentioned? Thanks
  5. Hi All, I have been searching for quite some time now for a script / process to check user online / offline status. I know there is no real "Ideal way" to check the status, as there could be a number of reasons for a user being "Offline / Online". My search for an updated way to check this has been fruitless and I was hoping that someone could either direct me to where I could read up on this, or perhaps give me some guidance. My thought process is that a user sessiontable would have to be created, this table will update when a user logs in in one column and logs out in another column... This way I can check when a user was last online, coupled with a current active session. The catch here is a user needs to physically logout... What of they don't logout? What if they go "Inactive" but are still online, so set an "Away" status. Any advice / guidance will be greatly appreciated. Thanks.
  6. I thought they would have it setup because I can't access or see any of the config files. So what could be missing / preventing the e-mails from coming through? Is there a check I can run?
  7. I am using / attempting to use PHP's mail function. How would I get access to the pgp.ini file though if I'm having my files run by a hosting company? Wouldn't / shouldn't these setting then already have been applied?
  8. Thanks again for your help, I have gone with the $_SERVER['DOCUMENT_ROOT'] option, and now have my form processing correctly and generating an activation e-mail with the link as expected (all data written to database). Now I just need to figure out as to why the activation e-mail delivery is failing / being rejected. A slow process to building this, but so far I am liking what I am seeing.
  9. Thanks Ch0cu3r, I'm going to implement your recommendations now and will hopefully sort out my issues. I really appreciate the help here. I didn't really want to use the absolute files paths, but I wasn't / am not sure how to refer back to the correct files without either duplicating a dbconfig file as an example inside each folder, but this makes it tedious to update each time. I like to try and add "files" that perform different functions in different folders... But I'm not always entirely sure of how to do this. From what you saying, is it safe to assume that I could always just have the $_SERVER['DOCUMENT_ROOT']. prefixed in front of any path / url and this will work? At the moment I am using file paths instead of url's because I'm doing a test build on my local machine.
  10. Hi there, I have included my code below. I uploaded the files here just in my earlier post. Form Page: <!DOCTYPE html> <?php //INCLUDE ANY INCLUDE FILES error_reporting(E_ALL & ~E_NOTICE); require_once('C:/xampp/htdocs/includes/dbconfig.php'); //CHECK IF THE USER IS ALREADY LOGGED IN //IF THE USER IS LOGGED IN REDIRECT THEM TO THE HOMEPAGE if( $user->is_logged_in() ){ header('Location: C:/xampp/htdocs/home.php'); } ?> <html> <head> <meta charset="utf-8"> <!-- LINKING TO FAVICON FILES --> <!--[if IE]><link rel="shortcut icon" href=="img/favicon.ico"><![endif]--> <link rel="icon" href="img/favicon.png"> <link rel="apple-touch-icon-precomposed" href="favicon.png"> <link rel="stylesheet" type="text/css" href="css/demo.css" /> <link rel="stylesheet" type="text/css" href="css/style3.css" /> <link rel="stylesheet" type="text/css" href="css/animate-custom.css" /> <!-- THIS IS THE TITLE TAG FOR THE CONTACT CENTRE MANAGEMENT SYSTEM --> <!-- <title><?php if(isset($title)){ echo $title; }?></title> --> <title>TechDesignLab - CCIS</title> </head> <body> <div class="container"> <!-- CODROPS TOP NAVIGATION BAR START --> <div class="codrops-top"> <a href=""> <strong>« Some Links</strong>Here </a> <span class="right"> <a href="http://www.techdesignlab.co.za"> <strong>System designed by TechDesignLab.co.za</strong> </a> </span> <!-- TRANSPARENT HIGHLIGHT OVER TOP NAVIGATION --> <div class="clr"></div> </div> <!--/ CODROPS TOP NAVIGATION BAR END --> <header> <h1>YOUR COMPANY NAME / LOGO <span>Contact Centre Information Systems</span></h1> </header> <?php //CHECK PAGE FOR ANY ERRORS if(isset($error)){ foreach($error as $error){ echo '<p class="bg-danger">'.$error.'</p>'; } } //IF THE ACTION IS JOINED SHOW SUCCESS if(isset($_GET['action']) && $_GET['action'] == 'joined'){ echo "<h2 class='bg-success'>Registration successful, please check your email to activate your account.</h2>"; } ?> <section> <div id="container_demo" > <!-- hidden anchor to stop jump http://www.css3create.com/Astuce-Empecher-le-scroll-avec-l-utilisation-de-target#wrap4 --> <a class="hiddenanchor" id="toregister"></a> <a class="hiddenanchor" id="tologin"></a> <div id="wrapper"> <div id="login" class="animate form"> <form action="processing/login.php" autocomplete="on" method="post"> <h1>Log in</h1> <p> <label for="username" class="uname" data-icon="u" > Username / E-Mail </label> <input id="username" name="username" required="required" type="text" placeholder="YourUserName OR YourEmail@domain.com" value="" tabindex="1"/> </p> <p> <label for="password" class="youpasswd" data-icon="p"> Password </label> <input id="password" name="password" required="required" type="password" placeholder="eg. X8df!90EO" tabindex="2"/> </p> <p class="keeplogin"> <input type="checkbox" name="loginkeeping" id="loginkeeping" value="loginkeeping" tabindex="3"/> <label for="loginkeeping">Keep me logged in</label> </p> <p class="login button"> <input type="submit" value="Login" /> </p> <p class="change_link"> Not registered yet ? <a href="#toregister" class="to_register">Register Here</a> </p> </form> </div> <div id="register" class="animate form"> <form action="processing/register.php" autocomplete="on" method="post"> <h1> Sign up </h1> <p> <label for="usernamesignup" class="uname" data-icon="u">Username </label> <input id="usernamesignup" name="usernamesignup" required="required" type="text" placeholder="YourUserName" value="" tabindex="4"/> </p> <p> <label for="emailsignup" class="youmail" data-icon="e" > E-Mail </label> <input id="emailsignup" name="emailsignup" required="required" type="email" placeholder="YourEmail@domain.com" value="" tabindex="5"/> </p> <p> <label for="passwordsignup" class="youpasswd" data-icon="p"> Password </label> <input id="passwordsignup" name="passwordsignup" required="required" type="password" placeholder="eg. X8df!90EO" tabindex="6"/> </p> <p> <label for="passwordsignup_confirm" class="youpasswd" data-icon="p">Password Confirmation </label> <input id="passwordsignup_confirm" name="passwordsignup_confirm" required="required" type="password" placeholder="eg. X8df!90EO" tabindex="7"/> </p> <p class="signin button"> <input type="submit" value="Register" name="register"/> </p> <p class="change_link"> Already registered ? <a href="#tologin" class="to_register"> Login Here </a> </p> </form> </div> </div> </div> </section> </div> </body> <script> </script> </html> Submission Page: <?php //IF THE FORM HAS BEEN SUBMITTED, PROCESS IT error_reporting(E_ALL & ~E_NOTICE); require_once('C:/xampp/htdocs/includes/dbconfig.php'); if(isset($_POST['submit'])){ //VERY BASIC VALIDATION OF USERNAME if(strlen($_POST['usernamesignup']) < 6){ $error[] = 'Your username is required to be a minimum of 6 characters.'; } else { $stmt = $db->prepare('SELECT username FROM sys_members WHERE username = :username'); $stmt->execute(array(':username' => $_POST['usernamesignup'])); $row = $stmt->fetch(PDO::FETCH_ASSOC); if(!empty($row['usernamesignup'])){ $error[] = 'The username you have entered is already in use.'; } } if(strlen($_POST['passwordsignup']) < 6){ $error[] = 'Your password should be at least 6 characters in length.'; } if(strlen($_POST['passwordsignup_confirm']) < 6){ $error[] = 'Your confirmation password should be at least 6 characters in length.'; } if($_POST['passwordsignup'] != $_POST['passwordsignup_confirm']){ $error[] = 'Passwords do not match.'; } //VERY BASIC VALIDATION OF E-MAIL if(!filter_var($_POST['emailsignup'], FILTER_VALIDATE_EMAIL)){ $error[] = 'Please enter a valid email address'; } else { $stmt = $db->prepare('SELECT email FROM sys_members WHERE email = :email'); $stmt->execute(array(':email' => $_POST['emailsignup'])); $row = $stmt->fetch(PDO::FETCH_ASSOC); if(!empty($row['emailsignup'])){ $error[] = 'The e-maill address you have entered is already in use.'; } } //IF NO ERRORS HAVE BEEN CREATED CARRY ON if(!isset($error)){ //HASH THE PASSWORD $hashedpassword = $user->password_hash($_POST['passwordsignup'], PASSWORD_BCRYPT); //CREATE THE ACTIVATION CODE $activasion = md5(uniqid(rand(),true)); try { //CREATE THE USER IN THE DATABASE USING A PREPARED STATEMENT $stmt = $db->prepare('INSERT INTO sys_members (username,email,password,active) VALUES (:username, :email, :password, :active)'); $stmt->execute(array( ':username' => $_POST['usernamesignup'], ':email' => $_POST['emailsignup'], ':password' => $hashedpassword, ':active' => $activasion )); $id = $db->lastInsertId('memberID'); //SEND A VERIFICATION / ACTIVATION E-MAIL TO THE USER $to = $_POST['emailsignup']; $subject = "Registration Confirmation"; $body = "<p>Thank you for registering at demo site.</p> <p>To activate your account, please click on this link: <a href='".DIR."activate.php?x=$id&y=$activasion'>".DIR."activate.php?x=$id&y=$activasion</a></p> <p>Regards Site Admin</p>"; $mail = new Mail(); $mail->setFrom(SITEEMAIL); $mail->addAddress($to); $mail->subject($subject); $mail->body($body); $mail->send(); //REDIRECT THE USER TO THE INDEX PAGE header('Location: .C:/xampp/htdocs/index.php?action=joined'); exit; //ELSE CATCH THE EXCEPTION AND SHOW THE ERROR. } catch(PDOException $e) { $error[] = $e->getMessage(); } } } //DEFINE THE PAGE TITLE $title = 'Demo'; ?>
  11. Included the dbconfig.php file as well as the error reporting at the top of each page. I'm back to getting a blank white page on submission. I've had to change some of my paths to absolute paths as the files are in different folders. Is there not a better way than using absolute paths?
  12. Does the dbconfig.php file have to be on both the form page and the submit page? Will include the error reporting now to check for additional info
  13. Named the submit button, but still no luck on writing to the database....
  14. I can't believe I missed the method... Feel like a fool... Ok so now that I've added that I checked and can confirm that the array now holds the data, but now it's not writing to the database. I still have to read through everything again so see what I may be missing.
  15. Hi, I am using POST. I have uploaded my files to verify. index.php register.php
  16. Hi All, I am currently working on a login / registration page combination. My form seems to not be passing any of the data into the array to be written to the database. Could someone perhaps help me in identifying where this issue may be? When clicking submit on registration, I get take to a blank page, and all the information entered in the form is displayed in the browser address bar (http://localhost/processing/register.php?usernamesignup=MyUsername&emailsignup=Mye-mail%40myemail.com&passwordsignup=123456&passwordsignup_confirm=123456) , adding var_dump($_POST);exit; to my form submit page, the array is shown on a blank white page as array(0) { } Please let me know if I show add my code, or if there are other error / validation checks I can do. Thanks.
  17. Hi All, I have a bit of a problem inserting a NULL value into my table. I have three field that I join and insert into one column. However, if all three fields are empty I need it to insert a null value and not 0. Please could someone help, here is what I have so far: First doing some sanitisation : // SANITIZE AND VALIDATE THE DATA BEING PROCESSED BY THE FORM $user_id = filter_input(INPUT_POST, 'user_id', FILTER_SANITIZE_STRING); $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING); $sales_reference = filter_input(INPUT_POST, 'sales_reference', FILTER_SANITIZE_STRING); $msisdn1 = !empty($msisdn1) ? "'$msisdn1'" : NULL; $msisdn2 = !empty($msisdn2) ? "'$msisdn2'" : NULL; $msisdn3 = !empty($msisdn3) ? "'$msisdn3'" : NULL; $msisdn = !empty($msisdn1 . " " .$msisdn2 . " " . $msisdn3) ? "'$msisdn'" : NULL; $identity = filter_input(INPUT_POST, 'identity', FILTER_SANITIZE_STRING); $sale_type = filter_input(INPUT_POST, 'sale_type', FILTER_SANITIZE_STRING); Then the INSERT Statements: if ($insert_stmt = $mysqli->prepare(" INSERT INTO usr_retentions_sales ( user_id , username , sales_reference , msisdn , identity , sale_type ) VALUES (?, ?, ?, ?, ?, ?)")) { $insert_stmt->bind_param( 'issiii' , $user_id , $username , $sales_reference , $msisdn , $identity , $sale_type );
  18. Hi All, I found a 3rd party script that solved one of my earlier issues, however, it is not working exactly as intended. The two issues I am having with the script is the following: 1. After selecting the radio button, I am able to submit the form without completing the required field that is created / unhidden. 2. 3 out of my 4 Radio buttons create a text field that need to be written to the same column in my database table, as a result all three fields have the same name, however when submitting the form, blank fields are written to the table for the first two fields (I'm assuming it's because the fields are over-writting each other in the submit process.) I would appreciate your help here. My code (With a live view) can be found here: http://codepen.io/SalientAnimal/pen/bNvaJg. Alternatively, here is the code (although it is very messy): First the CSS for the hide function #highlights .reveal-if-active { opacity: 0; max-height: 0; overflow: hidden; font-size: 16px; -webkit-transform: scale(0.; -ms-transform: scale(0.; transform: scale(0.; -webkit-transition: 0.5s; transition: 0.5s; } #highlights .reveal-if-active label { display: block; margin: 0 0 3px 0; } #highlights .reveal-if-active input[type=text] { width: 70%; float: left; } #highlights input[type="radio"]:checked ~ .reveal-if-active, input[type="checkbox"]:checked ~ .reveal-if-active { opacity: 1; max-height: 100px; padding: 10px 20px; -webkit-transform: scale(1); -ms-transform: scale(1); transform: scale(1); overflow: visible; } #highlights .highlight_body { color: #FFFFFF; font-size: 14px; font-weight: normal; text-align: left; background-color:#001B54; border-bottom: #F30 1px solid; border-top: #F30 1px solid; font-weight: normal; font: 85%/1.2 arial, helvetica, sans-serif; } #highlights label { display: block; font-weight: none; text-align: left; float: left; font: 85%/1.2 arial, helvetica, sans-serif; } #highlights .highlight_small { color: #FFFFFF; font-size: 10px; font-weight: normal; text-align: left; font: 85%/1.2 arial, helvetica, sans-serif; } #highlights .small{ color: #666666; display: block; font-size: 10px; font-weight: normal; text-align: left; font: 85%/1.2 arial, helvetica, sans-serif; } #highlights .radio_label{ color: #666666; font-size: 10px; font-weight: normal; text-align: left; font: 85%/1.2 arial, helvetica, sans-serif; } #highlights h1 { font-family: Arial, Helvetica, sans-serif; font-size: 16px; text-align: center; } The actual form code: <head> <title>My Page</title> </head> <script> var FormStuff = { init: function() { // KICK IT OFF ONCE, IN CASE THE RADIO IS ALREADY CHECKED WHEN THE PAGE LOADS this.applyConditionalRequired(); this.bindUIActions(); }, bindUIActions: function() { // when a radio or checkbox changes value, click or otherwise $("input[type='radio'], input[type='checkbox']").on("change", this.applyConditionalRequired); }, applyConditionalRequired: function() { // find each input that may be hidden or not $(".require-if-active").each(function() { var el = $(this); // find the pairing radio or checkbox if ($(el.data("require-pair")).is(":checked")) { // if its checked, the field should be required el.prop("required", true); } else { // otherwise it should not el.prop("required", false); } }); } }; FormStuff.init(); </script> <div id="container"> <div id="content" style="margin-top:-45px;"> <img src="images/logo.png" alt="logo"></img> <h1>Auxilium</h1> <div id="highlights" class="form"> <h1>My Page</h1> <table class='radio' border ='0'><tbody> <form id="retentions_sales" name="retentions_sales" action="process/submit_sales_retentions2.php" method="post"> <tr> <td colspan='5'> <p class='highlight_body'> <br/><b>User Details</b> </p> </td> </tr> <!-- USER INFORMATION IS AUTOMATICALLY WRITTEN TO THE FORM - THIS IS DONE THROUGH SESSION INFORMATION DURING THE LOGIN PROCESS --> <tr> <td> <label>Logged In As : <span class="small">User who is logged in</span> </label> <input type="text" name="username" id="username" value="<?php echo htmlentities($_SESSION['username']);?>" readonly style="background-color: #C9C9C9"> <input type="hidden" name="user_id" id="user_id" value="<?php echo htmlentities($_SESSION['user_id']);?>" readonly style="background-color: #C9C9C9"> </td> </tr> <!-- A RANDOM REFERENCE NUMBER IS GENERATED - THIS IS DISPLAYED TO THE USER WHEN THE FORM HAS BEEN SUCCESSFULLY SUBMITTED --> <tr> <td> <input type="hidden" name="sales_reference" id="sales_reference" value="<?php echo $random;?>" readonly style="background-color: #C9C9C9"> </td> </tr> <!-- ALL INFORMATION THAT IS REQUIRED IS CAPTURED IN THE TRANSACTION DETAILS SECTION OF THE FORM - THIS IS ALL DONE BY USER INPUT --> <tr> <td> <!-- TRANSACTION DETAILS THAT NEED TO BE CAPTURED --> <p class="highlight_body"><br/><b>Transaction Details:<b> </td> </tr> <tr> <td> <div> <input type="radio" name="sale_type" id="sale_type_new" value="0" required> <span class="radio_label">New Sale</span> <div class="reveal-if-active"> <label for="sale_type_new">Customer ID: <span class="small">ID on which the transaction was performed</span></label> <input type="text" id="new" name="identity" class="require-if-active" data-require-pair="#sale_type_new"> </div> </div> </td> </tr> <tr> <td> <input type="radio" name="sale_type" id="sale_type_save" value="1" required> <span class="radio_label">Save</span> <div class="reveal-if-active"> <label for="sale_type_save">Customer MSISDN: <span class="small">MSISDN on which the transaction was performed</span></label> <input type="text" id="msisdn" name="msisdn" class="require-if-active" data-require-pair="#sale_type_save"> </div> </td> </tr> <tr> <td> <input type="radio" name="sale_type" id="sale_type_upgrade" value="2" required> <span class="radio_label">Upgrade</span> <div class="reveal-if-active"> <label for="sale_type_upgrade">Customer MSISDN: <span class="small">MSISDN on which the transaction was performed</span></label> <input type="text" id="upgrade" name="msisdn" class="require-if-active" data-require-pair="#sale_type_upgrade"> </div> </td> </tr> <tr> <td> <input type="radio" name="sale_type" id="sale_type_cancellation" value="3" required> <span class="radio_label">Cancellation</span> <div class="reveal-if-active"> <label for="sale_type_cancellation">Customer MSISDN: <span class="small">MSISDN on which the transaction was performed</span></label> <input type="text" id="cancellation" name="msisdn" class="require-if-active" data-require-pair="#sale_type_cancellation"> </div> </td> </tr> </table> <table border='0'> <td align="right"> </td> <td align='right'><input type="submit" name="btn_submit2" id="btn_submit2" value="Submit"></td> <td align="right"> </td> </table>
  19. I have gone and created confusion on this thread by referring to it as an ID Number. The ID Number is not the table column that you would use as an ID column, but an Identity Number, where I am from each person has a unique ID Number (Identity Number) this is the same thing as a green card number / passport number.
  20. Hi there Csharp, Thanks for your reply. How ever the ID number is not a user ID Number as such but an Identity number, similar to that of a Green Card Number or a passport number. The reason I store the ID number and Cellular number in the same column is because if the person is a new subscriber they would not have a cellular number assigned to them, and they could possibly request more than one cellular number. However, in the instance of the user already having a cellular number I only want to be able to capture that cellular number once.
  21. Hi All, I have a bit of a problem with my one form. Initially the form only had two fields to capture, a radio button selection (4 options) and then a free text field. The free text field needs to be captured as either a Cellular number or an identity number, and originally this worked fine. The ID Number / Cellular number are both captured in the same field and thus write to the same column in my MySQL database. The problem now though is, that allow I want to allow duplicate ID Numbers, I don't want to allow Duplicate Cellular numbers. How to I allow the ID number to be a duplicate, but not the ID number? The reason why I am allowing either or to be captured, is because if it is a brand new user, I will not have a Cellular number for them, but I will have an ID Number. If it is a past user, I will have a cellular number and therefore HAVE to use the Cellular number, but want to prevent duplication of this number in my database. Any help here is appreciated. Here is my form's code: <!-- DISPLAY THE DETAILS OF THE LOGGED IN USER --> <!--<label>User Logged In : <span class="small">You are logged in as</span> </label>--> </div> <div id='radio' class='form2'> <table class='radio' border ='0'><tbody> <tr> <td colspan='4'> <p class='survey_highlight'> <b>Transaction Details</b> </p> </td> </tr> <tr> <td> <label>Logged In As : <span class="small">User who is logged in</span> </label> </td> <td> <input type="text" name="username" id="username" value="<?php echo htmlentities($_SESSION['username']);?>" readonly style="background-color: #C9C9C9"> <input type="hidden" name="user_id" id="user_id" value="<?php echo htmlentities($_SESSION['user_id']);?>" readonly style="background-color: #C9C9C9"> </td> </tr> <tr> <td> <label>Tracker Reference Number : <span class="small">Random Reference Number on Tracker</span> </label> --> </td> <td> <input type="hidden" name="sales_reference" id="sales_reference" value="<?php echo $random;?>" readonly style="background-color: #C9C9C9"> </td> </tr> <tr> <td> <label>Customer MSISDN / ID: <span class="small">MSISDN / ID on which the transaction was performed</span> </label> </td> <td> <input type="text" name="msisdn" id="msisdn"/> </td> </tr> <tr> <td colspan='4'> <p class='survey_highlight'><b>Please select a suitable transaction type from the options below</b></p> </td> </tr> <td> <!-- FIELD FOR CAPUTRING THE INTERVIEWEE'S AGE GROUP --> <label>Type of Transaction : <span class="small">What kind of transaction</span> </label> </td> <p id="sale_type_info"> <td> <label><input type="radio" name="sale_type" onChange="JavaScript:select_radio_button('sale_type_info');" value="0" id="rbg_sale_type_0"> <span class='survey_button'>New Sale</span></label> </td> <td> <label><input type="radio" name="sale_type" onChange="JavaScript:select_radio_button('sale_type_info');" value="1" id="rbg_sale_type_1"> <span class='survey_button'>Save</span></label> </td> <td> <label><input type="radio" name="sale_type" onChange="JavaScript:select_radio_button('sale_type_info');" value="2" id="rbg_sale_type_2"> <span class='survey_button'>Upgrade</span></label> </td> <td> <label><input type="radio" name="sale_type" onChange="JavaScript:select_radio_button('sale_type_info');" value="3" id="rbg_sale_type_2"> <span class='survey_button'>Cancellation</span></label> </td> </tr> <tr> <td> </td> </tr> </table> <table border='0'> <td align="right"> </td> <td align='right'><input type="submit" name="btn_submit2" id="btn_submit2" value="Submit"></td> <td align="right"> </td> </table> </tbody> </table> </form> </body> </div> </div> <div id="container"> <div id="footer" style="margin-top:0px;">
  22. So I was thinking about this more yesterday, and was thinking that I could for all purposes of what I want to do is to make a script as simple as saying, they would click on a button that says, "Get Next Lead" this would then set a flag to the next / next random lead and then assign it t their username. A status gets set to the leads of distributed, on hold, or something of that sort. I would need this button however to do a check that when I click "Get Next Lead" that I don't have any active leads. I would only be able to get a new lead if my current lead is set to "Completed" / "On Hold". So basically the "Get Next Lead" button should scan the DB Table for a record with no status set and assign that to the user.... I need some help though with the "Get Next Lead" buttons script. Thanks
  23. Hi All, I want to put together a process where by I distribute leads to a number of users but I am not sure where to start. If possible, could someone please let me know what I should be: 1. Searching for, or 2. Help with a possible solution script. The basic principle is that I had a table with +/- 1,000 leads (This number can vary from day to day). Everyday I have +/- 20 people available to work through the leads. I would like to distribute these leads to each of the users, based on availability. So in the morning, every person is given their first lead. When changing the status of the lead they are then given the next lead. They will only be able to get a new lead once they have had some kind of action on the lead. The lead may be set to a call back, and therefore, an agent needs to be able to go back into a lead they have worked on to complete it at a later stage. Any guidance here would be appreciated.
  24. Thanks for your answer here Jacques. I'm a really small time developer and sometimes wonder if I will ever really get my head wrapped around things. But I keep trying and information like what you gave just takes me one step closer to getting a better understanding. I know my code is not the prettiest and there is a lot that can be improved on. I just have to keep learning. Thanks again.
  25. Please ignore my post... I have found my error. I had named my one column incorrectly in my table. I feel like a complete idiot.
×
×
  • 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.