Jump to content

I-AM-OBODO

Members
  • Content Count

    394
  • Joined

  • Last visited

Everything posted by I-AM-OBODO

  1. Nope. There's a primary key which is an id and its different to the associates_id.
  2. Changing them to random values does not guarantee uniqueness. How/what then will guarantee uniqueness? "associates_id" should already be unique,and should remain thus was omitted cos of an oversight before and thats why its being populated now And, yes, an update query without a WHERE clause will affect ALL rows. So in this case, how does one add the WHERE clause when you want all the columns to be affected without doing it one by one? Thanks
  3. Hi I have a table that is filled with values already and now i want to add another column associate_id How can i update the columns with a random number? What i have is giving all the columns same number thanks $associates_id = mt_rand(10000, 99999); $stmt = $pdo->prepare("UPDATE associates SET associates_id= $associates_id "); $stmt->execute(); $affected_rows = $stmt->rowCount(); if ($affected_rows){ echo "DONE"; }else{ echo "NOT DONE"; }
  4. Hi. Sorry for late response. I haven't been around for a while. Can we please assume these as cities? If done with these i can try to get it done when all the cities are available. Thanks Boy Girl Man Lorry Car Plane Bus Cat Burry Woman Hussle Restless Tom Jerry Oakland Canon
  5. It means i dont get it. I said i came across the javascript and reused. Know nothing about javascript. Just want a quick fix to get on with what am doing. Thanks for the link. I have bookmarked it. Will learn a thing or two from it but dont have the time to start learning now cos i have a pressing situation at hand. Thanks.
  6. hi guys. pls i want city to display based on the province selected on my form. what i have currently is province display based on country selected. i came across the script while searching though. thanks <form> <div class="col-sm-9"> <select name="country" class="country form-control" data-error="Select a country" required> <option value="Canada">Canada </option> <option value="United States">United States </option> </select> </div> </div> <div class="form-group"> <label class="col-sm-3 control-label">Prov
  7. Hi. Pls I have a form that contains countries. Let say i want to do something else if a country in among the countries in my list and something else if not included. how can i archive this simply without doing multiple ifs. eg direct listed countries to page A else direct to page B Thanks
  8. Thanks. Found a gallery that i modified to make it up and running just as i wanted. Cant find how to mark thread as solved! Thanks
  9. Yeah. What i currently have can only view the images one after the other by clicking on the back button. But what i am after is to view the images like a gallery where all can be viewed with clicking the back button but by clicking an arrow key to view next or previous image. by code is $stmt = $pdo->prepare(" SELECT * FROM image_table WHERE post_id = '$_SESSION[post_id]' AND group_id = '$_SESSION[group_id]' "); $stmt->execute(); while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { echo '<a href="'.$row['image_path'].'"> View</a>'; echo "<br>
  10. Hi all, I don't know if there's a gallery for this already or the right place to ask the question. User uploads multiple images. Images are store in a different folder and a unique name stored on the database. All images have a unique group for referencing purpose . When a user clicks on a link in his table he can view all images pertaining to a group. How can i go about that? What i want to achieve is for example SELECT ALL FROM IMAGE_TABLE WHERE USERNAME = USERNAME AND GROUP_ID = GROUP_ID Thanks
  11. Thanks all. I decided to change my form method from POST to GET. Thanks
  12. Yes the position and industry are the search conditions. The user select the criteria from a list in the dropdown menu via a post.
  13. Ok. I did not include the ApplicantProfle page cos i feel it straight forward. But is something like this: <a href="Search-Result.php">Back</a> <?php $stmt = $pdo->query(" SELECT * FROM tbl_name LEFT JOIN $tbl_name2 ON tbl_name.email = tbl_name2.email WHERE tbl_name.email = '$_GET[id]' "); $row = $stmt->fetch(PDO::FETCH_ASSOC); ?> <h4>Personal Details</h4> <?php echo "<table class='table table-bordered' >"; echo "<tr><td width='30%'><strong>Firstname</strong>"; echo "</td><td>"; if(isset($row['fir
  14. yes thats exactly what i want to archieve. but when i click back button, the search result is expired and it blank
  15. Hi all, How can i go back to a search results after viewing a link on one of the search result. [search Result] $stmt = $pdo->query(" SELECT * FROM tablename WHERE tablename.position LIKE '%$position%' AND tablename.industry LIKE '%$industry%' "); $stmt->execute(); echo "<table width='100%' class='table-responsive table-hover table-condensed table-striped'>"; echo "<tr> <th bgcolor='#444444' align='center'><font color='#fff'>SN</th> <th bgcolor='#444444' align='center'><font color='#fff'>Firstname</th> <th bgcolor='#44444
  16. I tried merging the results and mail to the different users but it gets to only one user and it reveals other persons details. How can i merge the result and send to each user. Thanks <?php ##--------------------------## ## Prepare the mailer class ## ##--------------------------## //$message = htmlspecialchars($mess); $mail = new PHPMailer; //$mail->SMTPDebug = 3; // Enable verbose debug output $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = 'localhost'; // Specify main and backup SMTP servers $mail->SMTPAut
  17. Thank all for the help. Finally its working as expected.
  18. Oops! Thanks. I've seen where the problem lies. It's one of the html markups. Thanks a zillion dozen times
  19. Yes I am sure. I've inspected and found nothing!
  20. Sorry for that. Here is the code: ##--------------------------## ## Prepare the mailer class ## ##--------------------------## //$message = htmlspecialchars($mess); $mail = new PHPMailer; //$mail->SMTPDebug = 3; // Enable verbose debug output $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = 'localhost'; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = 'mails@mail.com'; // SMTP username $mail->Password = 'pasword'; //
  21. Good day. Hope all is well with you. I've been able to get the values from the database but the problem now is that the values are not well formatted. only the first item is inside the table and subsequent value are not aligned inside the table? Any help will do. Thanks
  22. Thanks. But yours did not send any mail.
  23. Hello. Congrats on ur 1k likes! I am still battling with this though. I have tried everything i could but the new problem is that, instead of sending the bills all at once, it sends them multiple times. eg lets say i have 7 bills, it sends 4 different mails some containing 3 bills, some containing 1bill and some containing 2 bills. All i want is all the bills associated to a use be sent to the user all at once. this is my current code: $bill_status = "OVERDUE"; $query = " SELECT username, trans_ref, due_date, service_provider, service_type, amount_paid, bill_status
×
×
  • 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.