goodban Posted July 30, 2015 Share Posted July 30, 2015 I have a logbook that I created using php/mysql with the help of dreamweaver. Everything was going fine until I wanted to add replies to the logbook. I have tried everything I can, but I cannot get this "include" file to pull up the right data, or come up at all. This is what I'm currently trying to do: <?php require('replies.php?<?php echo $row_logbook_reverse_id['id']; ?>=id'); ?> I just don't know where I'm going wrong. I've tried to search for this on php.net but honestly, I don't know the proper term of what I'm actually trying to do. Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted July 30, 2015 Share Posted July 30, 2015 php include/require statements, unless you specify the syntax for a url (protocol, domain, path, file - i.e. http://your_domain/your_path/your_file.php), operate on files through the file system, where url get parameters - ?some_name=some_value have no meaning. however, you would in general not want to use a url, because it is slow (your web server makes a http request back to your own web server), you only get the OUTPUT from your file, not the actual php code, and the two php settings that are required for a url to work are turned off by default due to the security problem of this allowing unvalidated external values being used to specify included files to allow a hacker to include their remote code onto your server and run it on your server. if your goal is to retrieve some information based on an id and make that information available to the 'calling' code, you would write a function that accepts the id as a parameter and returns the data to the calling program. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.