Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Phi11W last won the day on November 17 2020

Phi11W had the most liked content!

Community Reputation

12 Neutral

About Phi11W

  • Rank
    Regular Member

Recent Profile Visitors

974 profile views
  1. Thank you for posting your database's root password for the whole world to read. Go and change it right now. Stop using the root user in your Application code. Create dedicated accounts for each of your Applications and grant these accounts appropriate permissions. Always keep the biggest and best tools to yourself (so that you can sort out the mess made by other people or programs). Stop using Reserved Words as table / column names (e.g. "user" & "password"). Doing so will come back to bite you, at some point. Don't store the user's actual password. Instead
  2. Which file? Would you expect both the load() and save() method [of this subclass] to all the work to find out which file they needed to work with? No. What might be more "normal" would be to tell the object which file is should "save" itself to, i.e. you would pass the load() and save() methods the path to the target file. But then you have another problem ... This is a Box. A Musical Box, wound up and ready to ... no; that's a different story. This is a Box. It will be one of many Boxes and each of these will need to load() and save() themselves to/from somewhere
  3. You structure looks wrong to me. You have multiple form elements, each of which contains one select element with two option elements. I would expect there to be one form element, which contains one select element, which contains one or more option elements. echo( '<form method="POST">' ); echo( '<select name="inv">' ); if( mysqli_num_rows($result) ) { echo( '<option>' . $row["rizikos_lygis"] . '</option>' ); while( $row = mysqli_fetch_array($result) ) { printf( '<option value=\'%s\'>%s&nbsp;%s</option>' , $row["su
  4. As Brand says, try the assembled SQL manually and see what the database is objecting to. Some other thoughts: 1. You're wide open to an SQL Injection Attack. Obligatory XKCD Reference - Little Bobby Tables. Less severely, you're effectively excluding anybody with an apostrophe in their name, e.g. "Peter O'Toole", from registering with your site! Not that you'd be the only one, according to IrishCentral. Why is this? Because in your PHP code you're building a String value that just happens to contain some text that your database should be able to make sense of. By
  5. I'm not surprised you can't see what's going on wrong, with all the chopping and changing back and forth between HTML and PHP. Keep it Simple: <?php if(isset($_POST['Submit'])){ $name=$_POST["Name"]; } . . . $sql = 'SELECT * FROM dirCsv_500'; /* Added a missing ";" here */ if (!empty($name)) { $sql .= " where name like '%".$name."%'"; /* Added string concatenation */ } ?> /* Removed an extraneous ";" here that's actually in the HTML, not the PHP */ I think I can see what you're trying to do, but that's just not how you write PHP. You can "duck in an
  6. Just a thought, but did you ever consider using sprintf() instead of echo()? sprintf( '<li><a href="%s" title="%s"><i class="%s"></i> %s</a></li>' , $row['url'] , $row['title'] , $row['icon'] , $row['header'] ); Regards, Phill W.
  7. Does the "3rd Party Website API" offer a method by which you can retrieve the data in the order you want? That would be easiest. Failing that, you're just going to have to take the data as it is provided and then do the sorting yourself. If you're really lucky, the dates will already be in a sortable format ... Regards, Phill W.
  8. Never, never trust data values submitted by the User! You are wide open to SQL Injection Attacks. Obligatory XKCD Reference: Little Bobby Tables Read up on Prepared Statements or, at the very least, encode the values that you are using to build your "SQL" - a String variable that just happens to contains something that your DBMS can understand. And Barand is absolutely right - be extra careful with Date values. When is 03/06/09? Spring, Summer or Autumn? Regards, Phill W.
  9. Conclusion? The ItemName Form field is not being passed across. Check the HTML that should be sending it. Regards, Phill W.
  10. Do you also drive your car with all the dashboard indicator [warning] lights covered up? Sorry but, to me, this is just absurd. You need to get your site into surgery and "operate" on it, to fix the underlying problems, not just whack a Band-Aid on it and hope for the best! Sooner or later, one of those [ignored] warnings/errors is going to actually break your site and, suddenly, it'll be "all hands to the pumps", trying to get your site back up and running again, against a tidal wave of errors only one of which is the actual trouble-maker, and you'll [possibly] be losing mone
  11. Classic "Buffering" problem: Hugely simplifying your code, note what happens with/to the sHTMLTemp variable: $sHTMLTemp = ""; while ($unirow = mysql_fetch_array($uniresult)) // Where $result is your result set { if ($temp != $unirow['number']) { $sHTMLTemp = preg_replace("/(.+),/","\\1",$sHTMLTemp); print $sHTMLTemp ; print "</tr>"; $sHTMLTemp = ""; } /* Lots of putting stuff into sHTMLTemp */ } /* -- END WHILE -- */ On change of "number", you print out the sHTMLTemp variable and clear it down, ready to be loaded with the next Player's data.
  12. This is actually quite an informative error message: "Too few arguments to function curlCall() ..." "... 1 passed in /clientzone/modules/products.php on line 33" "... at least 2 expected in /clientzone/includes/functions.php:0" You've defined a function curlCall that takes "at least 2" arguments . You're now calling that function with only 1 argument. Bzzzt!! PHP says "No". Regards, Phill W.
  13. No. It doesn't do anything at all with slashes. As I said: So your file might look like this ... ... and, if you entered "apple", the code would generate the link: <a href="https://blabla.com/blablabla/blablablabla/apple" target="_blank" rel="noopener noreferrer">apple</a><br/> If you are expecting multiple links to be generated based on what you enter, then please explain how you would expect this to work. Regards, Phill W.
  14. As given, the code loops through each line in the file, looks to see if that line contains the entered word and, if so, displays that line on screen, effectively creating the HTML link (because that's what each line of the file is!). It's a really clumsy way of doing this, because The links are hard-coded in the file, making them difficult to maintain, and The test (strpos) will find the given word anywhere in line, so if you were to enter the value "target", it would match each and every line! A simpler and safer way might be to hold just the words in the file, without
  15. What does the generated HTML look like (Use the "View Source" tool in your browser). Remember that your PHP is effectively just building a String that gets sent to the browser for it to make sense of. Copy the link URL out of the browser and make sure that that it works on its own. It may simply be that $row['linkpage'] isn't a valid URL. Regards, Phill W.
  • 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.