Jump to content

Search the Community

Showing results for tags '$_form'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 1 result

  1. Hi, please, I have a strange problem... I do not know how to solve it, I'm trying for numerous hours... And sorry for my english. I prepared the following synthesis: --- All file in the server root of the web site contain only the statement: <?php require(’server/general.php’); ?> --- general.php basically read an external text file which contains the static html code for that web page identified by - $currentFileName = basename($_SERVER[’PHP_SELF’]); and then print his contents. (This approach allows a fluid management of central contents like the menu or links, particolar issues or appearance, and so on, through a file that contains some meta-informations about the site map) general.php concludes itself setting (in javascript) the html parameters (like input or hinnerHTML): <script> <?php $formParameter = isset($_POST[”u”]) ? $_POST[”u”] : ””; $x = ”xxx”; require(”server/”.$currentFileName); ?> </script> --- Let be that $formParameter isn’t a void value, for example it is ”Pippo”. In the file named ”server/”.$currentFileName, there are these statements: print $formParameter; print $x; // this invalidates javascript, but it is now for php debugging [and, correctly, ouput is: ”Pippo”, ”xxx”] if (!existingValue($x)) { print ”xxxxxxxxxxxxxxx”; writeLog(”x=_”.$x.”_”); clientMessage(...some parameter...); } [and, correctly, no output is done] if (!existingValue($formParameter)) { [And here there is the problem] print ”yyyyyyyyyyyyyyy”; // $formParameter = ”abcdef”; [now it is commented] writeLog(”formParameter is _”.$formParameter.”_”); clientMessage(...some parameter...); } After this if-statement, I print again the parameter: print ”after if: ”.$formParameter; --- prefixing that: 1# the soubroutine existingValue is only: function existingValue($T) { return ( trim($t)!=”” ); } 2# the soubroutine writeLog() write something in a text file 3# clientMessage() soubroutine postpones to a new web page, writing a message for the user , I see that: A# correctly, no print yyyyyyyyyyyyyyy in the last if-statement B# ?!?... writeLog executes! writing in the text file the string ”formParameter is __” C# correctly, not executes clientMessage() soubroutine D# then the flow of the program behaves as if it had never entered if, so it prints the string ”after if: Pippo”. Moreover, if after the statement - print ”yyyyyyyyyyyyyyy”; I uncomment - $formParameter = ”abcdef”; then output of B# became: ”formParameter is _abcdef_”. Why yyyyyyyyyyyyyyy isn’t printed (within the javascript code) but $formParameter is setted? Strange. The flow enters in the if-statement (but it should not do!) and does this only partially? --- Now, really, it isn’t a serious error because the program works equally (see point D#). But I need to understand why exists some aspect of the matter in which $formParameter is evalutated void, because I must make the check of client’s input Note: removing the include and carrying hits contents directly in the parent file (general.php), the problem disappears... but I cannot do this, because general.php has a general role, disconnected from a form-input. THANK YOU FOR YOURS ADVICES
  • 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.