Sponsored Content
Top Forums Web Development I can't open my index.php page after insert php code Post 302356419 by metalfreakbr on Friday 25th of September 2009 11:59:39 AM
Old 09-25-2009
I can´t believe it !!! I´ve just found my stupid mistake!!

Code:
<?
       if ($_POST['entrar']=='Entrar!')
       {
        @session_start();
        $result = mysql_query('select log_nome,senha from usuarios where log_nome="'.trim($nome).'";',$conexao);
        if (mysql_num_rows($result)>0)
        {
         $usuSenha = mysql_result($result,0,senha);
        else
        {
         $usuSenha = 'notuser';
        }
...

Now, look what I´ve forgot to insert or better... finnish !!

Code:
<?
       if ($_POST['entrar']=='Entrar!')
       {
        @session_start();
        $result = mysql_query('select log_nome,senha from usuarios where log_nome="'.trim($nome).'";',$conexao);
        if (mysql_num_rows($result)>0)
        {
         $usuSenha = mysql_result($result,0,senha);
        }
        else
        {
         $usuSenha = 'notuser';
        }
...

I forgot to finnish the code ( { } ).
Anyway, thanks for your patience Neo.
regards.
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PHP: problem with index.php

iam geting a error with this index script. heres the error Parse error: parse error in c:\phpdev\www\dev\compulearn\in work\index.php on line 39 Whats wrong?? ------------------------ <?php //display header and left bars include ('header.php'); include ('left.php'); //connect... (13 Replies)
Discussion started by: perleo
13 Replies

2. Shell Programming and Scripting

PHP:page.php?id= ????

Hi, i have this script to read from mysql (layout below) and the script will display the course title, and a url to the id, but when i click on the url it just goes back to that page(displaying all the course titles)but when u click on a course title i want it to read from detail table in php and... (1 Reply)
Discussion started by: perleo
1 Replies

3. UNIX for Dummies Questions & Answers

Integrating bash script into php (page)

I have written a bash script...now i need to call the script from php page. Can you give me an example to demonstrate how it is done?:( (1 Reply)
Discussion started by: xerox
1 Replies

4. Shell Programming and Scripting

Running php index.php as shell in webpage

so i have a bit of a unique situation. i have an encrypted index.php file that that can't be run the normal way that a web browser would run it. if it is run the normal way, the php script will show only gibberish on the web browser, instead of the actual php code. when run from the command... (8 Replies)
Discussion started by: SkySmart
8 Replies

5. Shell Programming and Scripting

Test Server - Forum Code Changes for PHP 5.3.10 to PHP 7

Here is some docs of my ongoing work to port this forum PHP code which is running on 5.3.10, to PHP 7. Motivation: Unfortunately, every thing that has a beginning must have an end. PHP 5.6 active support ended January 19, 2017. It will receive security support until December 31, 2018. #1 ... (7 Replies)
Discussion started by: Neo
7 Replies
APACHE_LOOKUP_URI(3)							 1						      APACHE_LOOKUP_URI(3)

apache_lookup_uri - Perform a partial request for the specified URI and return all info about it

SYNOPSIS
object apache_lookup_uri (string $filename) DESCRIPTION
This performs a partial request for a URI. It goes just far enough to obtain all the important information about the given resource. This function is supported when PHP is installed as an Apache module or by the NSAPI server module in Netscape/iPlanet/SunONE webservers. PARAMETERS
o $filename - The filename (URI) that's being requested. RETURN VALUES
An object of related URI information. The properties of this object are: ostatus othe_request ostatus_line omethod ocontent_type ohandler ouri ofilename opath_info oargs oboundary ono_cache ono_local_copy oallowed osend_bodyct obytes_sent obyterange oclength ounparsed_uri omtime orequest_time EXAMPLES
Example #1 apache_lookup_uri(3) example <?php $info = apache_lookup_uri('index.php?var=value'); print_r($info); if (file_exists($info->filename)) { echo 'file exists!'; } ?> The above example will output something similar to: stdClass Object ( [status] => 200 [the_request] => GET /dir/file.php HTTP/1.1 [method] => GET [mtime] => 0 [clength] => 0 [chunked] => 0 [content_type] => application/x-httpd-php [no_cache] => 0 [no_local_copy] => 1 [unparsed_uri] => /dir/index.php?var=value [uri] => /dir/index.php [filename] => /home/htdocs/dir/index.php [args] => var=value [allowed] => 0 [sent_bodyct] => 0 [bytes_sent] => 0 [request_time] => 1074282764 ) file exists! PHP Documentation Group APACHE_LOOKUP_URI(3)
All times are GMT -4. The time now is 06:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy