Jump to content

Eiolon

Members
  • Posts

    358
  • Joined

  • Last visited

Everything posted by Eiolon

  1. I have an external webserver that needs to communicate with an internal one for a PHP script. External server Linux-based Apache Internal server Windows-based IIS On the external server, I will have a script that in the FORM ACTION I will link to a script at the internal server. <form action="http://IP_ADDRESS_HERE/script.php" method="get"> Username: <input type="text" name="username" /><br /> Password: <input type="text" name="password" /><br /> <input type="submit" value="Submit" /> </form> My question is, do I need to enable anything on the external or internal web server in the PHP config to allow this to work? With the external server I cannot change anything in the PHP.ini, which is why I am trying to re-direct to the internal server.
  2. Thanks for your reply. When I use children, nothing expands. When I use nextAll it expands ALL the programs at once, not just the one I clicked on.
  3. I have a table that has the first row being the name of a program, and the second row being the session(s) available. The program and sessions are being pulled from a database. Example: ======================================= English 101 Date / Time ======================================= Session A 9/1/2012 Session B 10/1/2012 ======================================= Math 101 Date / Time ======================================= Session A 9/1/2012 Session B 10/1/2012 When the program name such as "English 101" is clicked, the row with the sessions expand so you can see what is available. However, the jQuery is only displaying the first session "Session A". I know my database query is correct, as if I remove the jQuery the table is displayed properly in full. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript"> jQuery(document).ready(function() { jQuery(".sessions").hide(); jQuery(".programs").click(function() { jQuery(this).next(".sessions").slideToggle(500); }); }); </script> </head> <table> <?php $last = '0'; do { if($row_programs['pid'] != $last){ ?> <tr class="programs"> <th align=left><?php echo $row_programs['pname']; ?></th> <th align=left>Date / Time</th> </tr> <?php } ?> <tr class="sessions"> <td><?php echo $row_programs['sname']; ?></td> <td><?php echo $row_programs['date_time']; ?></td> </tr> <?php $last = $row_programs['pid']; } while ($row_programs = mysql_fetch_assoc($programs)); ?> </table> </body> </html>
  4. You set the session.save_path in your PHP.INI file.
  5. If you did not enter it into the database with line breaks, you can use the wordwrap function in PHP to tell it when to line break. http://php.net/manual/en/function.wordwrap.php
  6. I log the hostname of the computers when they do certain things in our Intranet. When the hostname is logged, certain clients are getting both the hostname and the localhost IP address added. For example, if the PC name is TOMS-PC, the hostname logged is TOMS-PC172.0.0.1 Other clients are logging just the hostname as it should be. All I use to grab the hostname is: $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); Any clues as to what causes this?
  7. Nevermind, I just installed the 32-bit version of PHP instead to make it work. I thought it was the OS holding me back, but it was PHP.
  8. I just upgraded to a new web server. Using Windows Server 2008 64-bit, Apache 2.2.1, PHP 5.2 and MySQL 5.5. I created an ODBC connection using the 32-bit Microsoft Access driver because there is not a 64-bit one around. However, my script wants to look at the 64-bit ODBC drivers so it does not detect the 32-bit one exists. Is there a way to force it to look for the 32-bit Access Driver?
  9. If I were to only allow certain IP addresses to access certain files/directories, how secure is this? Is it easily hackable?
  10. I think it could use some color, at least on the front page. Black and gray look negative to me when you are trying to find eternal happiness Also, your logo of keystonepersonals.com, the .com is highlighted to stand out. You want people to remember the name of your site, not the .com. One will assume it will be a .com but if they don't remember what comes before it then it is useless.
  11. So I am trying to learn PDO and after some reading, I have found that you cannot use exec with select statements, however, if you are using a prepared statement, you can. However, PDO has a function just selecting the data, using PDO::query. So my question is, how do I know when is the proper used to use PDO::query or the prepared statement route? I have been able to duplicate the queries using both methods and obtain the same results. Is the prepared statement needed for sanitizing the data if I am selecting from user input and PDO:query used if I am only doing a general select where I explicitely state what I am selecting for in the SQL statement?
  12. I am starting to learn PDO by re-writing one of my existing scripts. Do I still need to validate $_GET or does PDO do the work for me? Currently I am using: $id = $_GET['id']; $sth = $dbh->prepare('DELETE FROM van_reservations WHERE id = :id'); $sth->bindParam(':id', $id, PDO::PARAM_INT); $sth->execute(); I used to validate by using this: $id = isset($_GET['id']) && is_numeric($_GET['id'])?(int) $_GET['id']:0;
  13. Nevermind, had to redownload PHP and install the ext.
  14. Does anyone know how or where I can get this dll file? I am currently using ODBC to connect to a mssql server and want to move away from ODBC.
  15. Just a silly question. I've been using 1 and 0 to tell if something is true or false, such as if a feature is enabled or not. I see that some use the words true and false. Is there a proper way or is either way correct? Thanks!
  16. I am working on a hosted application that will tie into other companies databases to get certain information. The database information the user provides (host, port, user, pass, db) will be encrypted, but I also want the user to control the key. I do not want to be able to see what they key is. Any ideas on how to pull this off design wise?
  17. I am logged into the MySQL command line as root. I created a new user: CREATE USER 'programs'@'localhost' IDENTIFIED BY 'mypassword'; Then I try and grant privileges: GRANT SELECT, INSERT, UPDATE, DELETE ON programs.* TO 'programs'@'localhost' I get this as the response: Query OK, 0 rows affected (0.00 sec) When I check the user, it still has N for each of the permissions. I tried flushing privileges. Using MySQL 5.5.
  18. try this:http://www.ntchosting.com/mysql/insert-date.html It is possible. I use now() all the time.
  19. Looks fine to me, but I did notice that $category appears as the fourth field in your SQL statement, but when you are escaping the data, it appears as the third item. Try moving $details in front of $category when you are escaping your data so it's in the same position in your SQL statement. I've seen weirder things.
  20. Since I cannot edit the php.ini file in shared hosting environment, how would I set the file upload path and size? Thanks!
  21. Like the concept, but the design needs polishing and the logo looks like something made in MS Paint. You've got some validation errors. Check at: http://validator.w3.org/ When you fill out the post form, if your form errors out you have to re-enter all the info again. Kind of interested in the overhead to run the site, if only cash is accepted, which means you'll almost none of it is automated. Do people send you the card to hold onto and make the switch, like escrow?
  22. $_SERVER['HTTP_REFERRER'] will tell you the URL that you came from. Just make sure you validate it.
  23. Are you running a web server with PHP installed? Sounds like your server isn't parsing the PHP code.
×
×
  • 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.