[PHP] Re: please help me I try to post my question to Php.net 2-3 times

2006-02-16 Thread Barry

[EMAIL PROTECTED] wrote:

text file problem

read text file to array string. I use function File(). but when I display
data in text file it compress space in each lines such as first record
contain "1_2__3__4__" ( _ = blank )
when store in array string is "1 2 3 4" . I want you tell me howto do?
+

// data in text file is "1_2_3_4" < _ = blank>
// output is "1 2 3 4"
// I want fixed possition . please help me ?
from Wvolks


is it just "whitespace" or are there also commands in it like \t or \r ?

Otherwise just replace the whitespace with "" like

$filename = "c:data.txt";
str_replace(" ", "", $contents);
echo $contents;

Something like that?

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Please help me retrieving data from a PHP file!!???

2004-01-16 Thread Ben Ramsey
> How to retrieve data from a PHP file? (The value that will
> be retrieved of course it is echoed in the PHP file, and it
> will be shown in a TextBox in my VB program.. so I want to
> retrieve it to my EXE VB program that will put it inside a
> TextBox or something like that..)
From within a PHP file, you may use exec() or passthru() to execute an 
external program and return the results to the PHP script.  Seems to me 
like VB should have something similar to execute a PHP script (perhaps 
through HTTP or something).

At any rate, I think you would probably need to ask this question on a 
VB mailing list, since they may be able to help you better.  If your PHP 
script just echos something, then you'll need to find out what VB 
function there is to execute the PHP script and grab the value that is 
echoed.

-Ben

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Please help me with these questions..

2004-01-16 Thread Ben Ramsey
An excellent resource for all these questions is the documentation found 
at http://www.php.net/docs.php.  Below, I've provided some links to the 
specfic docs for each question.

1- MD5 with PHP values.
http://www.php.net/md5

2- Random values in PHP.
http://www.php.net/manual/en/function.rand.php

3- Inserting values to mySQL DB by PHP and importing from them 
also to send echo. (For example : after MD 5some strings in PHP 
I want to insert them into the database also then to echo these 
MD5 strings).
http://www.php.net/manual/en/ref.mysql.php

4- How to echo something.
http://www.php.net/manual/en/function.echo.php

5- How to make some GET values like : 
http://www.mysitename.com/test.php?username=abc then insert 
them to the database.
http://www.php.net/manual/en/language.variables.predefined.php
http://www.php.net/manual/en/reserved.variables.php#reserved.variables.get
http://www.php.net/manual/en/language.variables.external.php
Hope that helps!
-Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Please Help me

2002-07-09 Thread Chris Shiflett

Djurovski Dejan wrote:

> What's wron in my script?
> I receive message:
> *Warning*: Supplied argument is not a valid MySQL result resource in 
> *c:\inetpub\wwwroot\login.php* on line *12*
> I input validate username ˛password!
>  
>  
>  include("config.php");
> if(!empty($username))
> {
> print("$username, $password");
>  
> $aDBLink=@mysql_connect("$host", "$user", "$password");


Your problem might be that you use $user here, where everywhere else you 
seem to think it is called $username.

> mysql_select_db("$db", $aDBLink);
> $aSQL="select * from administracija where 
> administracija_username=$username";
> $aQResult=mysql_query($aSQL, $aDBLink);


You can also make a call to mysql_error() here, because MySQL is 
probably ready to tell you why your query did not execute correctly.

>
> $broj= mysql_num_rows($aQResult);
> P.S. I tried to send this message to General mailing list, but i could 
> not. I am subscribed!


You should really try to figure out why you can't post to php-general. I 
receive nearly 1000 messages a day and cannot be relied upon to reply to 
every one. Also, others may benefit from your question and the fact that 
it is archived on the list, and it is always better to get a few 
different perspectives on a particular problem.

Happy hacking.

Chris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php