Jump to content

BigD

Members
  • Content Count

    75
  • Joined

  • Last visited

Community Reputation

0 Neutral

About BigD

  • Rank
    Newbie

Profile Information

  • Location
    us- Texas
  • Interests
    Travel
  1. BigD

    different behavior

    Jsg, How do you find PHP version number?I went to myPHP admin panel and it showed PHP 3.x.x.x.
  2. BigD

    different behavior

    Folks, I resolved all the problems and got everything working on remote server. Let me tell you what I did.my local server has version 3.3.9 and remote server has version 3.4.10.1 I do not know it is the software versiondifferences or the PHP variables value differences; they behave differently.I did not change any PHP variable values.On remote server, goto causes syntax error, echo causes header() not transfer control, it is case sensitive on panel names.error goes to error-log, not screen.I modified my code to make it work on remote server.If you know what causes those behavior on remote se
  3. BigD

    different behavior

    I captured PHP variables/values on both home pc local PHP adm and web server. I plan to change home PC PHP values to be the same as web serverso problems on remote can be tested locally. I am not experienced on PHP. Anyone have done similar things please advise. Does ini file need to be the same? Thanks.
  4. BigD

    different behavior

    I have another piece code using the same logic, This one passed control to another panel.<?phpsession_start();include ("../mylibrary/login.php");login();$userid = $_POST['userid'];$password = $_POST['password'];//echo "<h2> userid is $userid</h2>\n";//echo "<h2> password is $password</h2>\n";$query = "SELECT userid from admins where userid = '$userid' and password = PASSWORD('$password')";//echo "SQL $query\n";//$query = "SELECT userid, firstname from admins where userid = '$userid' and password = '$password'";//echo "SQL $query\n";$result = mysql_query($query);if
  5. BigD

    different behavior

    I changed code as suggested, it echoed where it was but the 2 lines added at the beginning did not produce any debug info. Is there another way to go to another panel after displaying "going to next panel"? <?phpini_set('display_errors', '1');ini_set('error_reporting', 'E_ALL');session_start();include ("mylibrary/login.php");login();$userid = $_POST['userid'];$password = $_POST['password'];echo "<h2> userid is $userid</h2>\n";echo "<h2> password is $password</h2>\n";//*********$query = "SELECT stdid, firstname from student where userid = '$userid' and password = PA
  6. Enjoyed the comics. Yes goto should be discouraged to use, but there are times it is the simplest thing and the right thing to do. Can you share what the unexpected result might be?
  7. Krewe, you answered my question. It works. Thanks.
  8. BigD

    different behavior

    There are other pieces PHP code worked on home PC but just sits there on server PC, no errors displayed. Anyone noticed there are differences when code is running on remote server?
  9. BigD

    different behavior

    On my home PC server I did not get Headers already sent error, it just brought up std.php."values in the POST array are treated as strings" does not cause a probelm, why making the change?
  10. BigD

    different behavior

    My code ran ok on my PC, ran differently after I uploaded to web server. The code checks if user in database. brings up std.php if it is.On web server it passed the check but failed to bring up std.php. it just sits there. <?phpsession_start();include ("mylibrary/login.php");login();$userid = $_POST['userid'];$password = $_POST['password'];$query = "SELECT stdid, classid, lastname, firstname from student where userid = '$userid' and password = '$password'";$result = mysql_query($query);if (mysql_num_rows($result) == 0){ echo "<h2>Sorry, your account was not validated.</h2><
  11. For Scout: I got it. Problem was due to the PHP coding. Thanks Scout.
  12. Question for Scout: I tried your code and it worked.When I tried to incorporate that into my code, I got syntext error. It did not like the curly bracket after the table in style section. I have 2 styles, did I do it wrong?<?php//header("Pragma: no-cache");//header("Expires: 0");/*<head><style>@page { size 8.5in 11in; margin: 2cm }div.page { page-break-after: always }</style><style type="text/css"> /*<![CDATA[*/table{ width:40%; border:3px solid black; float:left; margin-left:5%;}td{ border:1px dotted black;} /*]]>*/ </style></head>?>
  13. I attached a screen snapshot to my first post. Some how as I look at it now, it did not show correctly.What I meant was: From the web page generated by the code, I do a file > Print Preview, Only the first table can be seen, other tables are ant-sized.
  14. Yes. Thanks.What does table{} in style do? Without that tables will lay top to bottom. What does this do /*<![CDATA[*/ ?
  15. I changed code to use mysql_affected_rows(), it should 0 rows affected. The search Key on Update SQL is exactly the same key on SELECT SQL. I am still puzzled why Update did not update. No SQL_error though. just no update.
×
×
  • Create New...