Jump to content

2020

Members
  • Content Count

    96
  • Joined

  • Last visited

Community Reputation

0 Neutral

About 2020

  • Rank
    Regular Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @mac_guyver, based on your advices, this is now what my notes look like. Did I get them correct or not ? <?php include 'error_reporting.php'; error_reporting(E_ALL); ini_set('error_reporting',E_ALL); ini_set('display_errors','1'); ini_set('display_startup_errors','1'); if($_SERVER['REQUEST_METHOD'] === 'POST') { if(ISSET($_POST['submit'])) { if(ISSET($_POST['keywords'])) { $keywords = $_POST['keywords']; } $query = "SELECT page_url,link_anchor_text,page_description,keyphrases,keywords FROM links WHERE keywo
  2. @mac_guyver, If I got this: while(mysqli_stmt_fetch($stmt)) { echo "$page_url"; echo "<br>"; echo "$link_anchor_text"; echo "<br>"; echo "$page_description"; echo "<br>"; echo "$keyphrase"; echo "<br>"; echo "$keywords"; echo "<br>"; echo "|"; echo "<br>"; } then I don't need this before the loop. Right ? $stmt_fetch = mysqli_stmt_fetch($stmt); Yes or no ? What happens if I
  3. 11. only <input ... > or <button ... > tags that have a type='submit' attribute are capable of submitting the form. use one or the other, not both. I was supposed to weed-out the 4 buttons for 1. I forgot to do it. Anyway, the first 3 weren't working. Only the latter 2. Which one you recommend out of these working 2 ? <button name=submit value=" ">Search</button><br> <button type="submit" name="submit" value="submit">Search</button> 12. only form elements with a name='...' attribute will be included in the submitted data
  4. So, this is wrong ? $stmt_fetch = mysqli_stmt_fetch($stmt); if($stmt_fetch === FALSE) { printf("Error: %s.\n", mysqli_stmt_error($stmt)); printf("Error: %d.\n", mysqli_stmt_errno($stmt)); die; } while(mysqli_stmt_fetch($stmt)) { echo "$page_url"; echo "<br>"; echo "$link_anchor_text"; echo "<br>"; echo "$page_description"; echo "<br>"; echo "$keyphrase"; echo "<br>";
  5. Mac Guyver, If you don't mind me asking, show us a simple EXCEPTION, TRY & CATCH on 2 prepared statements. The 2 prepared statements should be for these mysql queries: 1. INSERT query 2. SELECT query From your examples, we will learn. After that, it shouldn't be too hard for me to do likewise for DELETE, UPDATE queries. Once I got the hang of things from your example, then I should not be making these mistakes again. And you won't have to repeat yourself either to me or someone else as your reply code sample should be enough to teach the newbies.
  6. Let me see Mac Guyver, if I understood you correctly. 1. you are no longer requiring (you should use 'require', not 'include', and both of these are not 'functions' so don't put ( ) around the filename) either the connection or the error .php files. Instead, you have attempted to insert the code into the main file, introducing errors in the code and adding repetitive logic. why did you change this? did you miss the point about putting common code into a .php file and requiring it when needed? You said this is incorrect: include('conn.php'); So now I changed it to: inc
  7. Why did it make you think I was "Hi Friends" ? Who is he/she and from which forum ? If you must know, which Benanamen knows as I told him once but he still keeps forgetting, my usernames are usually based around the forum's name. If you want to know why Benanamen hates me, google for: "Uniqueideaman". You won;t find me misbehaving in any forum. It's just I used to program (learn) every night. When I came across an obstacle, I first opened a thread in some forum. Sometimes I got answered immediately or on the same day. Sometimes I had to wait a day or 3. At the end, I realized the wait was
  8. visiter52 ? I'm not born in 1952. Not even my dad! I thought you'll never figure it out this time but I guess I was wrong! What was the name of that other British forum where you and that Brit mate of your's ganged up against me simply because I asked the same questions across 10 forums to get tonnes of opinions for my learning purose since all programmers don't answer equal ? What was his username TJ or whatever. The whining guy. He was helpful though originally but at the end I put up with more of his whining than anything else and he started getting on my nerves. I must try my luck at
  9. Folks, I managed to get this piece of code working. But I need you to check if it is buggy or in error or not. I will add VALIDATION later. Just let me know is this how you query db with mysqli_stmt_bind_result (prepared statement using procedural style) and display results on screen ? Don't worry about pagination. i will add that later. Just let me know if I got the basics correct or not to display results from db or not. That is all. Note my comments in CAPITALS. They are questions to which I need answers. conn.php <?php $db_server = 'localhost';
  10. Did I understand your hint Mac Guyver ? I switched to this now: mysqli_report(MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT); Error gone. Should I keep it at that since I do not know how to deal with all this exception thingy as it is way over my head. This is producing result: <?php //include('error_reporting.php'); error_reporting(E_ALL); ini_set('error_reporting',E_ALL); ini_set('display_errors','1'); ini_set('display_startup_errors','1'); ?> <form name = "search" method = "POST" action=""> <label for="keywords">Keywords:*</label> <input type
  11. Php programmers, I am getting this error: Fatal error: Uncaught mysqli_sql_exception: No index used in query/prepared statement (null) in C:\xampp\htdocs\test\select_adv.php:70 Stack trace: #0 C:\xampp\htdocs\test\select_adv.php(70): mysqli_stmt_execute(Object(mysqli_stmt)) #1 {main} thrown in C:\xampp\htdocs\test\select_adv.php on line 70 Line 70 is: if(mysqli_stmt_execute($stmt) === FALSE) Context: if(mysqli_stmt_prepare($stmt,$query)) { mysqli_stmt_bind_param($stmt,'s',$_SESSION['search_column']);
  12. This thread may now be closed! Issue: SOLVED!
  13. Issue SOLVED! No one in this forum or another could figure out what the problem was. I got a handful of programmers in this forum and another that usually are able to help me but on this occassion everyone failed BUT one programmer on another forum who came across my thread last night or so! Some new guy to me. No offense to anyone here. Didn't come here to gloat but share my SOLUTION. 2 of my threads will be closed here and there soon thanks to him. The issue was the buttons I was using weren't working. His button did. Look at my current code. You will see his button (last butto
×
×
  • 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.