Jump to content

Ch0cu3r

Staff Alumni
  • Posts

    3,404
  • Joined

  • Last visited

  • Days Won

    55

Ch0cu3r last won the day on December 15 2015

Ch0cu3r had the most liked content!

About Ch0cu3r

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

57,717 profile views

Ch0cu3r's Achievements

Newbie

Newbie (1/5)

255

Reputation

28

Community Answers

  1. The contents of the page your want to "password protect" need to go where this line is <!-- normal page content -->, Example <html> <head> <title> Basisschool De Regenboog </title> <style> img { position: absolute; left: 60%; } </style> </head> <body> <script> </script> <!-- header of your page, up until the content area --> <?php if (!isset($_POST["password"]) || $_POST["password"] != "123") { // no password or wrong password ?> <form action="" method="post"> <p>Password: <input type="password" name="password"> <button type="submit">Enter</button></p> </form> <?php } else { // correct password ?> <!-- normal page content --> <a href="http:/www.youtube.com"><img src="Plaatjes/youtube.png" /></a> <?php } ?> <!-- footer of your page --> </body> </html> If the user has not submitted the correct password then the login form will show. Only until the user has entered the correct password (currently 123) then the youtube link will display.
  2. Maybe the tab/spaces is coming from $item->station_id . Try applying trim to that variable. fclose needs to be moved outside of the loop.
  3. Why cant you use $_GET? This is what it is for GET is used for requesting resources You cannot do pagination using Post/Sessions
  4. We have a Best Answer button in the bottom right hand corner of each post.
  5. Did you miss my post? I have explained what you need to do also pointed to relevant documentation pages. I am not going to write the code for you. Have a go yourself if you become stuck then post what you have tried. I have removed your contact number, not a good idea posting your personal contact details on open forum on the internet.
  6. This must be down to your editor. PHP will not change the source code for no reason. Can you explain how you are editing/saving your .php files?
  7. Start with using glob to list files in a directory. Outputting each file in HTML anchor tag, in the url for each link pass the filename as a querystring parameter Use $_GET superglobal variable to get the filename from the querystring. Checking to make sure the file exists. if the file does exist use then usefile_get_contents to output the contents of the file. You may to use header for setting the correct mime type in order for the browser to display the contents of the file properly.
  8. Doesn't have to be. If the the form is submitting to itself then in the forms action add a hash, eg <form action="#invoice" method="post"> ... form ields ... </form> When the page loads, in javascript use window.location.hash to get the hash value, it it is equal to #invoice then have the invoice tab be the active tab rather than the customer tab. Judging by your screenshot you are possibly using Bootstrap tabs component? Looking at the documentation you should be able to call the .show() method on your invoice tab to set as active, eg if(window.location.hash == '#ivoice') { $('#invoiceTabIdHere').tab('show'); // should make the invoice tab active }
  9. Try adjusting the xpath query to be $rows = $xpath->query('//table[@id="r"]/tbody[@class="table-text"]/tr[not(descendant::td[contains(@class, "break-row")])]'); It should ignore any table row that contains a <td> tag with the class "break-row"
  10. You will want to use Googles Analytics Embed API for integrating your analytic's into your webpage.
  11. There shouldn't be double quotes around mysqli_connect. It should be $conn = mysqli_connect(db_host, db_user, db_pass, db_name);
  12. First you need to use the following xpath query. $rows = $xpath->query('//table[@id="r"]/tbody[@class="table-text"]/tr'); As your HTML table is not syntax formatted then the following lines will no longer work. // explode on each newline character in nodeValue (note the HTML tags are stripped out, leaving just the text inside the td tags) // and merge with the $defaults array $values = array_replace($defaults, explode("\n", trim($row->nodeValue))); // remove any whitespace before or after each value $values = array_map('trim', $values); Instead replace them with the following // get the values for the child "td" tags in the row $values = getChildNodeValues($row->childNodes, 'td'); And add the following function before the foreach loop function getChildNodeValues(&$nodeList, $nodeName) { $values = array(); foreach($nodeList as $node) { if($node->nodeName == $nodeName) $values[] = trim($node->nodeValue); } return $values; }
  13. Tried checking your servers error logs?
  14. You would use $dom->loadHTMLFile() in place of $dom->loadHTML()
  15. In the php.ini You can run phpinfo to see your current php configuration settings
×
×
  • 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.