[PHP] Is it Possible?

2005-02-04 Thread Sagar C Nannapaneni
I'm calling a php script with img tag

for ex: img src=http://localhost/test.php?img=asfd;

and the test.php is as follows...

test.php

?
...
...
some server side validations
...
readfile(abcd.gif);
?
---

Theres no problem with this..its working fine. But i want to return some 
text(or Html) the 
browser along with the image. So is there anyway that i can send the text to 
the browser
in this fashion. Even anyother solution other than the img is also Ok. 
Showing img
is not a priority for me but sending the text is..

Any help will be greatly appreciated..

Thanks,
/sagar

Re: [PHP] Is it Possible?

2005-02-04 Thread Sagar C Nannapaneni
Figured it out from the other way
hope others may find this useful

script language=javascript src=yourscript.php/script

Note that what ever you optput in your php do that with

echo document.write('asdfasdf');

/sagar

- Original Message -
From: Erwin Kerk [EMAIL PROTECTED]
To: Sagar C Nannapaneni [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Friday, February 04, 2005 5:36 PM
Subject: Re: [PHP] Is it Possible?


 Sagar C Nannapaneni wrote:
  I'm calling a php script with img tag
 
  for ex: img src=http://localhost/test.php?img=asfd;
 
  and the test.php is as follows...
 
  test.php
  
  ?
  ...
  ...
  some server side validations
  ...
  readfile(abcd.gif);
  ?
  ---
 
  Theres no problem with this..its working fine. But i want to return some
text(or Html) the
  browser along with the image. So is there anyway that i can send the
text to the browser
  in this fashion. Even anyother solution other than the img is also Ok.
Showing img
  is not a priority for me but sending the text is..
 
  Any help will be greatly appreciated..
 
  Thanks,
  /sagar


 I guess you're trying to get some data from the server after the page
 load (problably by javascript), so this might be of help:

 http://www.scss.com.au/family/andrew/webdesign/xmlhttprequest/



 Erwin Kerk


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




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



[PHP] unable to execute external program

2005-01-13 Thread Sagar C Nannapaneni
Hi,

I've compiled an external program in my linux server.
That program creates a pdf file taking a html file as input.
when i run it thru the command line its working fine.
But when i tried to execute the same command from php
with exec() command its not working.

Note that from command i'm logged in as root. And i'm
using PHP as another user on the same server.

Any other suggestions to run a command line commad thru PHP??

/sagar


Re: [PHP] Re: unable to load curl

2005-01-10 Thread Sagar C Nannapaneni
 Please respond to the newsgroup and not to my personal email.

 quoteIs it a file access/ownership thing?/quote

 This is possible.  Have you checked permissions for PHP user?  My
 original question remains unanswered though and it is probably a better
 place to start...

   extension_dir = C:\php\extensions
  
   where all the extension dlls reside.
   All extensions are working and all dlls are loading properly,,

 What do you mean by this statement? How do you know this if you claim
 that cURL is not loading (it is an extension)... have you tried phpinfo()
?


What i mean by the statement is that when i tried to load other
modules(extensions u could say)
 like php_cpdf,php_mhash...they are working...i mean i could see them as
enabled in phpinfo().

But when i load the curl extension i'm getting error.

Yes..i've tried phpinfo().

Its not displaying anything about cURL.

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



Re: [PHP] Re: PHP any Mysql connection- new b

2005-01-09 Thread Sagar C Nannapaneni
You didnt mentioned where your problem is and what the error that you are
getting.
check in the line

mysql_select_db (userpass);

That you have the grant and other administrative privilages to the user and
the database
you have to operate on is mysql

mysql_select_db (mysql);

Anyhow note that PHP5 has released...i dont see any good reason why u r
still using php 3.

/sagar
- Original Message -
From: M. Sokolewicz [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Saturday, January 08, 2005 9:55 PM
Subject: [PHP] Re: PHP any Mysql connection- new b


 php 3.0???!

 man, you seriously need to think about upgrading :| PHP 3 is seriously
 outdated

 - tul
 Babu wrote:

  Hi all,
 
  I am using php 3.0 and mysql and win xp.
  i want to add users to database through php page.
 
  adduser.php
  html
  FORM METHOD=post ACTION=add.php
  Real Name: INPUT TYPE=text MAXLENGTH=70 NAME=real_name SIZE=20Br
  Username: INPUT TYPE=text MAXLENGTH=70 NAME=username SIZE=20Br
  Password: Input Type=text Maxlength=70 Name=userpass Size=10Br
 
  INPUT TYPE=submit VALUE=Add INPUT type=reset VALUE=Reset
Form/form
  /tr/td/table/tr/td/table
  /body
  /html
 
  when i enter the fileds and submit ,the action is not performed, instead
add.php file is opened.
 
  add.php
  ?
 
  $ID = uniqid(userID);
 
  $db = mysql_connect(localhost,root,halfdinner);
 
  mysql_select_db (userpass);
 
  $result = mysql_query (INSERT INTO users (id, real_name, username,
password )
  VALUES ('$ID', '$real_name', '$username', '$userpass') );
  if(!$result)
 

  echo bUser not added:/b , mysql_error();
  exit;
  }
  if($result)
 

  mysql_close($db);
  print User b$username/b added sucessfully!;
  }
  else
 

  print (Wrong Password);
  }
  ?
 
  is the problem due to mysql and php connection.i am using windows xp
with apache2.
 
  i followed the steps said by someone in the previous thread.that is
adding libmysql.dll to system32 and so on. I cannot find php_mysql.dll in
php.ini.
  can some one help
 
  Thanks
  babu
 
 
 
  -
   ALL-NEW Yahoo! Messenger - all new features - even more fun!

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




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



[PHP] unable to load curl

2005-01-09 Thread Sagar C Nannapaneni
Hi,

I've got a strange issue here

i'm using apache2 with php 4.3.9 on win 2000.
I've pointed the php extension directory to

extension_dir = C:\php\extensions

where all the extension dlls reside.
All extensions are working and all dlls are loading properly,,
but when i try to load curl i'm getting an error saying that

Unable to load module. C:\php\extensions\php_curl.dll could not be found

But i can see the file from the file browser.

Please help me out...

/sagar


Re: [PHP] How to argue with ASP people...

2005-01-05 Thread Sagar C Nannapaneni
Ya..

I just had an argument with my collegue (who is ASP programmer).
He said that in ASP he can use a global variable to store the counter and
then
when the IIS is shutting down he can grab that event and dump the counter
variable
to a text file. I just betted him that i can also do that with PHP.

/sagar
- Original Message -
From: Chris Shiflett [EMAIL PROTECTED]
To: Sagar C Nannapaneni [EMAIL PROTECTED];
php-general@lists.php.net
Sent: Tuesday, January 04, 2005 10:12 PM
Subject: Re: [PHP] How to argue with ASP people...


 --- Sagar C Nannapaneni [EMAIL PROTECTED] wrote:
  But just 2 days ago i came along a situation where i have to
  write a hit counter for my website without using a database
  or a text file. Just using a global variable i wanted to do
  this.
 
  I dont know whether php can do this...(or may b i missed it
  out)...but i couldnt get any equivalent thing in php like we
  have GLOBAL.ASA in ASP.

 If GLOBAL.ASA isn't considered a text file, then you can probably use
 SQLite. Just don't call it a database. :-)

 What sort of situation did you encounter where you were required to
 persist data without the two primary means of doing so? You can persist
 data in memory, I guess, depending on how permanent you need this to be -
 your hit counter would be reset when the server reboots. It could be like
 the high scores on an arcade machine. :-)

 Chris

 =
 Chris Shiflett - http://shiflett.org/

 PHP Security - O'Reilly HTTP Developer's Handbook - Sams
 Coming Soon http://httphandbook.org/



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



Re: [PHP] unable to write a text file larger than 10Mb

2005-01-03 Thread Sagar C Nannapaneni
yes,,

I'm sure that my script is not timing out...

Also i set mysql connection timeout to max.

/sagar
- Original Message -
From: Burhan Khalid [EMAIL PROTECTED]
To: Sagar C Nannapaneni [EMAIL PROTECTED]
Cc: php-general@lists.php.net
Sent: Monday, January 03, 2005 3:37 PM
Subject: Re: [PHP] unable to write a text file larger than 10Mb


 Sagar C Nannapaneni wrote:
  Hello All,
 
  This is very imp and urgent for me. I've a very large db on my remote
website. I want to get a backup of that db. phpmyadmin is installed on the
server..but if failed to create the backup (may b coz of the time outs). so
i wrote my own class to get the backup. Its working fine except that PHP is
not able to write a file larger than 10Mb. I've tried to export the data to
Excel...The same problem repeated again. Is there any parameters to change
in php to make it write larger files...???

 Are you sure your script isn't timing out?

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





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



Re: [PHP] How to argue with ASP people...

2005-01-03 Thread Sagar C Nannapaneni
I'm a passionate freak of PHP from the past 4 years (that i can remember).
And i love everything that php can do. But just 2 days ago i came along a
situation where i have to write a hit counter for my website without using
a database or a text file. Just using a global variable i wanted to do this.

I dont know whether php can do this...(or may b i missed it out)...but i
couldnt
get any equivalent thing in php like we have GLOBAL.ASA in ASP.

/sagar
- Original Message -
From: M Saleh EG [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: John Sands [EMAIL PROTECTED]; php-general@lists.php.net
Sent: Tuesday, January 04, 2005 11:14 AM
Subject: Re: [PHP] How to argue with ASP people...


 Not to offend u or backup ASP but ur just wrong...

 You said:
 You
 can't actually create a class.

 That's not true! u might not be knowing the syntax of creating a class
 in vb or js script. Sorry but this is the truth my friend.


 On Mon, 3 Jan 2005 10:27:05 -0800 (PST), Richard Lynch [EMAIL PROTECTED]
wrote:
  You can spend a small fortune in ASP adding in COM objects (or writing
  them) so it will eventually have maybe HALF the functionality of PHP.
 
  http://php.net/
 
  ASP's Object Oriented feature set is a joke.
  All the object-ness is built into pre-packaged stuff from MS -- You
  can't actually create a class.
 
  ASP has no include function.  This makes life very very very difficult
to
  write decent code.
 
  ASP database drivers are slower than PHP's, for those few databases that
  ASP even supports.
 
  $$$ -- ASP costs a *LOT* more than PHP, by the time you get done
factoring
  in *ALL* expenses.
 
  --
  Like Music?
  http://l-i-e.com/artists.htm
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


 --
 M.Saleh.E.G
 97150-4779817

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




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



[PHP] unable to write a text file larger than 10Mb

2005-01-02 Thread Sagar C Nannapaneni
Hello All,

This is very imp and urgent for me. I've a very large db on my remote website. 
I want to get a backup of that db. phpmyadmin is installed on the server..but 
if failed to create the backup (may b coz of the time outs). so i wrote my own 
class to get the backup. Its working fine except that PHP is not able to write 
a file larger than 10Mb. I've tried to export the data to Excel...The same 
problem repeated again. Is there any parameters to change in php to make it 
write larger files...???


/sagar


Re: [PHP] Next page every second

2004-12-23 Thread Sagar C Nannapaneni
If all you want to display each record one by one at a particular interval
of time
you could do this at one page itself...here is the procedure

1. connect to mysql
2. grab the row you want
3. store the row number in a session variable
4. Add an autorefresh code to ur html..(lot of java scritps are there for
setting the time interval for the page refresh)
5.  when the page again loads grab the row number from session and increment
it by one

hope that the logic will work out...

/sagar
- Original Message -
From: Greg Wardawy [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Friday, December 24, 2004 10:39 AM
Subject: [PHP] Next page every second


 Ladies and gentlemen of PHP,

 I'm quite new to PHP (coming from Perl) so please don't laugh too hard if
 I'm missing something obvious.
 My scenario is as follows:
 Connect to the MySQL server-grab the data from the table-display the
data
 of the first row on the web page-sleep 1 second-display the data from
the
 next row-sleep 1 second... and so forth up to the last row of the table.
 I'm able to get the next page displayed by using a link to it (a snippet
 below) but I'm out of ideas how to have the next page displayed every
 second. So far I'm getting tons of tables displayed on the page or tons of
 the variables displayed in a single cell of the table. I could really use
 your help here.
 Happy Holidays to all of you and many thanks for any suggestions given.

 Greg.


#
 __SNIP__
 table width=420 height=12 border=3 cellpadding=6 cellspacing=4
 bordercolor=#9900CC
   tr
 th width=60 scope=colVariable/th
 th width=360 scope=colValue/th
   /tr
   ?php do { ?
   tr
 th width=601/th
 td width=360 nowrap=nowrap bordercolor=#660066
 bgcolor=#FFdiv align=right class=style8?php echo
 $row_gail_data['var1']; ?/div/td
   tr
 th width=602/th
 td width=360 nowrap=nowrap bordercolor=#660066
 bgcolor=#FFdiv align=right class=style9?php echo
 $row_gail_data['var2']; ?/div/td
   /tr
   tr
 th width=603/th
 td width=360 nowrap=nowrap bordercolor=#660066
 bgcolor=#FFdiv align=right class=style10?php echo
 $row_gail_data['var3']; ?/div/td
   /tr
   tr
 th width=604/th
 td width=360 nowrap=nowrap bordercolor=#660066
 bgcolor=#FFdiv align=right class=style7?php echo
 $row_gail_data['var4']; ?/div/td
   /tr
   ?php } while ($row_gail_data = mysql_fetch_assoc($gail_data)); ?
 /table
 /p
 pa href=?php printf(%s?pageNum_gail_data=%d%s, $currentPage,
 min($totalPages_gail_data, $pageNum_gail_data + 1),
$queryString_gail_data);
 ?Next/a
 /p
 __SNIP__


#

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




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



[PHP] couldnt backup database

2004-12-21 Thread Sagar C Nannapaneni
Hello all,

I've a table in my database with 1 lakh records using a disk space of around 
50Mb. I wanted to download the records. I used phpmyadmin (coz my hosting 
provider doesnt allow remote access to my db) to export the database but its 
not working for larger databases. I thought that it might be a problem with the 
max execution time. So i thought i wud manually store the records in a text 
file so that i can download it. But when i tried that its not creating the file 
beyond 10Mb. I've tried these things out..

ini_set ( max_execution_time, 300);
ini_set ( mssql.connect_timeout, 300);
ini_set ( memory_limit, 500);

but not working

can anyone help me out with this problem..

Thanks,
/sagar


Re: [PHP] i'm beginner and i couldn't solve the problem

2004-12-08 Thread Sagar C Nannapaneni
$sql = INSERT INTO testTable values ('', '$_POST[testField]');

should be

$var = $_POST[testField];
$sql = INSERT INTO testTable values ('', '$var');

/sagar

- Original Message -
From: Mecnun [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 08, 2004 4:23 PM
Subject: [PHP] i'm beginner and i couldn't solve the problem


 I'm usin php, apache and mysql on my computer. I have run some scripts. so
i'm sure i installed them correctly. One of my script don't run properly,
also it doesnt give error.
 I'm trying to send some data to my database by using a form. The database
can get the auto incremented number but doesn't get whatever I type into the
text box in the form. My code is below:
 --
 ?php
 file://open the connection
 $conn = mysql_connect(localhost, selimatmaca, BETULBETUL);
 file://pick the database to use
 mysql_select_db(testDB, $conn);
 file://create the sql statement
 $sql = INSERT INTO testTable values ('', '$_POST[testField]');
 file://execute
 if
sql_query($sql,$conn)){ 
 echo Record Added;
 } else{ 
 echo Somethin went wrong;
 }
 ?
 --
  
  
 mysql select * from testTable;
 ++--+
 | id | testField|
 ++--+
 |  1 | some value   |
 |  2 | some value   |
 |  3 ||
 |  4 ||
 |  5 ||
 |  6 ||
 |  7 ||
 |  8 ||
 |  9 |  [testField]|
 | 10 | [testField]|
 | 11 ||
 | 12 ||
 | 13 ||
 | 14 ||
 ++--+
 14 rows in set (0.00 sec)
  
  
 The database dont show the testField data, but it shows the numbers.
 Also this is my html form:
  
  
  
 !DOCTYPE HTML PUBLIC -//W3C/
/DTD HTML 4.01 Transitional//EN
 html
 head
 titleAn Insert Form/title
 meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
 /head
 body
 FORM ACTION=insert.php METHOD=POST
 P Type something in:br
 input type=text name=testField size=30
 input type=submit name=submit value=Insert Record
 /P
 /FORM
 /body
 /html


  There is another script for which I dont use a html form. I send the data
directly from the script and it works fine. Codes are here:

 html
 head
 titleUntitled Document/title
 meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
 /head
 body
 ?php
 $conn = mysql_connect(localhost, selimatmaca, BETULBETUL);
 mysql_select_db(testDB, $conn);
 $sql = INSERT INTO testTable values ('', 'some value');
 if (mysql_query($sql, $conn))
  {
  echo record added;
  }
  else
  {
  echo Something went wrong;
  }
 ?
 /body
 /html


 so, please tell me where I'm doing wrong. Thanks a lot.


 -
 Do you Yahoo!?
  Yahoo! Mail - Find what you need with new enhanced search. Learn more.

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



[PHP] Getting latest Session name

2004-12-03 Thread Sagar C Nannapaneni
Hello friends,

I just wanna know is there any way out to know the name of the latest
created session. The issue i'm fixed up with is

I'm storing some variables in the session and the session expire is set
to some 24hrs. Now when i close the browser and when i again open the
same page after some time i need to get the same variables that i stored 
in my previous login. Is that possible???

/sagar


[PHP] Reg Jpgraph...

2004-11-26 Thread Sagar C Nannapaneni
Hi all,

I think I shouldnt post this here...but i didnt find proper support at the 
jpgraph
forums.

I'm using PHP 4.3.9 with GDK precompiled on apache2 using win2k.

When i open any of the jpgraph example files its giving me an error saying
IE cannot find the site your are requesting. But when i remove some code
in the example file and refresh the page its working and when i put the deleted
code again back in that file and refresh its displaying the graph. When i close
and open a fresh browser the same problem persisting. Couldnt find what might
be the problem.

Again ...i'm sorry for posting this topic here...

/sagar


Re: [PHP] cacheing problem

2004-10-17 Thread Sagar C Nannapaneni
You have some restriction on the size of the data u send
through GET method.. like i remember it as 256Kb or so.
So if u r sending data larger than this limit ...u need to use the post
method

/sagar
- Original Message -
From: Mag [EMAIL PROTECTED]
To: Greg Donald [EMAIL PROTECTED]; php php
[EMAIL PROTECTED]
Sent: Monday, October 18, 2004 7:59 AM
Subject: Re: [PHP] cacheing problem


 Hi,
 I dont really have a problem in converting from POST
 to GET but the html FILE box does not post its
 variables if it is not in POST

 eg:
 input type=file name=upload

 if you do a submit with $_GET the $_FILES array will
 be  or not existant

 How to pass that?

 Thanks,
 Mag


 --- Greg Donald [EMAIL PROTECTED] wrote:

  On Sun, 17 Oct 2004 17:16:09 -0700 (PDT), Mag
  [EMAIL PROTECTED] wrote:
   Warning: Page has Expired
 
  You can use the GET method instead of POST in your
  form if that's appropriate.
 
 
  --
  Greg Donald
  Zend Certified Engineer
  http://gdconsultants.com/
  http://destiney.com/
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


 =
 --
 - The faulty interface lies between the chair and the keyboard.
 - Creativity is great, but plagiarism is faster!
 - Smile, everyone loves a moron. :-)



 ___
 Do you Yahoo!?
 Declare Yourself - Register online to vote today!
 http://vote.yahoo.com

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




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



Re: [PHP] sending SMS messages to mobile phones from PHP

2004-10-11 Thread Sagar C Nannapaneni
You can use SMSTERM

/sagar
- Original Message -
From: SunTan.co.uk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, October 10, 2004 7:38 PM
Subject: [PHP] sending SMS messages to mobile phones from PHP


 Hi there,

 I want my website to be able to send me an SMS message to my phone when
 somebody fills our contact form in.
 Does anybody do this already? If so, how?
 I think that I need an SMS service but I'm not sure what one is or how
much
 it'll cost us.
 Please advise.

 [EMAIL PROTECTED]


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




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



[PHP] anonymous from address using mail()

2004-10-07 Thread sagar
Hi all,

I'm using mail([EMAIL PROTECTED],$subject,$message,$mail_from);

But i get an email with a from address as anonymous@myserver.com

I want to show the from address to be like From : Sagar
plzz help me out

/sagar


[PHP] AutoLogin

2004-10-06 Thread Sagar C Nannapaneni
Title: Blank



Hi all,
I have a website which has a login form with username and password.
How can i login into that website providing the username and pwd from
the php script. I know that this can be done...but wonder how.
The website uses a JSP files with jsp session and also before
logging in..it asks for ssl authentication.

Ur help will b a great help to me...

Regards,
/sagar



[PHP] Stored procedures in Mysql

2004-09-30 Thread Sagar C Nannapaneni
Hi folks,

I wonder whether Mysql supports procedures and triggers

:?

/sagar


[PHP] Problem with uploaded file

2004-09-26 Thread Sagar C Nannapaneni
Hello folks,

I'm facing some sort of problem here. I'm uploading a file from
the clients system to the server. Everything working fine except 
that the file that is being uploaded is having a file permission of
600 ie only read and write to the owner only.

So i'm not able to change the permissions (either with some ftp
client or thru the file manager on the server) nor am i able to 
download the file even.

Is there any way that i can set permissions to the files that are
being uploaded.??

here is the code is used...

$uploaddir = './photos/';
  print pre;

  $arr_basename=explode(.,$_FILES['userfile0']['name']);
  $file_type=$arr_basename[1];
  $nameofphoto=$profileid.1..$file_type;

  @move_uploaded_file($_FILES['userfile0']['tmp_name'], $uploaddir . 
$nameofphoto); 
  $uploaddir = './photos/';
  print pre;

  $arr_basename=explode(.,$_FILES['userfile1']['name']);
  $file_type=$arr_basename[1];
  $nameofphoto1=$profileid.2..$file_type;

  @move_uploaded_file($_FILES['userfile1']['tmp_name'], $uploaddir . 
$nameofphoto1); 
  $uploaddir = './photos/';
  print pre;

---
plzz help me out..

/sagar


[PHP] PHP frontend

2004-09-15 Thread Sagar C Nannapaneni
Hi there,

I wonder whats this PHP forntend is?
Is this diff from the PHP we work with regularly?
If any one could suggest some articles on thisit wud b greatly apprecieated

Thanks,,
/sagar


[PHP] prob parsing Url

2004-09-14 Thread Sagar C Nannapaneni
Hi folks..

I'm using a form to send data from one page to another.

one of the input fields in the form has a quotation mark 

Ex.: samsung 15 monitor

in the next page i cant get the text after the  symbol in the field.

I've tried both GET and POST methods.

what might b the problem

/sagar


[PHP] small query prob in Mysql

2004-09-13 Thread Sagar C Nannapaneni
Hi everybody,

I'm having a database named items, inthat 
one field name is itemname and the contents of
that field is as follows

Monitor 15 - LG
Monitor 17 - Samsung
Keyboard - TVS
Monitor 15 - Samsung
Mouse - Genius
Keyboard - Microsoft


The first part is the component name and the second is the Company name
I need to have the distinct components in this field...like this

Monitor
Keyboard
Mouse

Any help would b greatly appreciated

Thanks in advance,

/sagar



[PHP] check this new site

2002-02-08 Thread Sagar Chand

hi all out there,

just tell me howz this new site
www.linuxfornerds.com
A site meant for ardent linux lovers but every one r
invited to post any views on any open source software.
so get ur voice out

/sagar

__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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




Re: [PHP] Using session functions in PHP4.1.1

2002-02-03 Thread sagar N chand

i dont know how u r using the thing like PHP on the fucking Win. Moreover
WinMe is the worst of all the OS's. So, better migrate to other OS as soon
as possible.

/sagar

- Original Message -
From: John Mpaliza [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 04, 2002 1:23 AM
Subject: [PHP] Using session functions in PHP4.1.1


Hi,

I'm using Win ME-Apache1.3.22-PHP4.1.1 and run this script:
?php
session_start();
?
I got this error: Php has caused an error in PHP4TS.DLL and will be closed.
If the problem continues try to reboot your system.
And in the Apache log file I got : Premature end of script headers.
This happens when using functions: session_start and session_register
What can I do to resolve the problem.


John Mpaliza




_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




[PHP] cant redeclare class.....

2001-10-20 Thread Sagar

Hi all,

I'm using jm_sms class in mysql 
dowhile($myrow=mysql_fetch_array($result)) loop.
the class is running fine for the first time. But when it is called for the 
second time i'm
getting an error saying cant redeclare the class. How to make this class 
work within
a loop.

i'm attaching the files if u want to look inside.

any help is highly appreciated.

thanks,

/sagar 

HTML
HEAD
TITLE Welcome to SMS reminder . . . . .  /TITLE

/HEAD

BODY
?
$db=mysql_connect(localhost,root,terminator);
mysql_select_db(smsdb,$db);

$da=getdate();
$datestamp=$da[year]-$da[mon]-$da[mday];
$custime= date(H:i);
list($ahour, $amin) = explode(:,$custime);
$sql=select * from sms where taskdate='$datestamp' and hour(tasktime)='$ahour' and 
minute(tasktime)='$amin' and delivered !='Y';
$result=mysql_query($sql);
if($myrow=mysql_fetch_array($result))
{   
// Example script using jm_sms class

$email = [EMAIL PROTECTED];// MTNSMS login email address
$password = rascal;   // MTNSMS password
$number = +91 . $myrow[cellno]; // GSM phone number to send to
$signature = SAGAR SMS;   // Signature for text message
$message = $myrow[smstext];;  // Content of text message
$debug = FALSE; // Debugging messages not displayed

// Add additional accounts if required
// $jm_sms-addLogin( [EMAIL PROTECTED], password2 );
// $jm_sms-addLogin( [EMAIL PROTECTED], password3 );

include( class.jm_sms.php );
$jm_sms = new jm_sms( $email, $password, $debug );

// Add Proxy Server details if required
// $jm_sms-setProxyServer( proxyserver );
// $jm_sms-setProxyPort( 81 );
// $jm_sms-setProxyUser( proxyusername );
// $jm_sms-setProxyPass( proxypassword );
// $jm_sms-setProxy( TRUE );

$jm_sms-sendSMS( $number, $signature, $message );  


}

?
/BODY
/HTML


?

/*
jm_sms 0.7 21/09/01
Copyright (C) 2001 James McGlinn [EMAIL PROTECTED]
jm_sms is a class for sending GSM text messages via the
free web-based service at http://www.mtnsms.com/.
Updates can be found at http://james.mcglinn.org/jm_sms/.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
(See http://www.gnu.org/copyleft/gpl.html)

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Changes:
0.7  21/09/01  Randomised login array for faster sending
  when over quota on first account.
  Speed optimisations in network code
   thanks to Mike Petrov ([EMAIL PROTECTED]).
0.6  06/06/01  Added check for incorrect login details.
0.5  31/05/01  Proxy support added
   thanks to Bas ([EMAIL PROTECTED]).
0.4  28/05/01  Provision for multiple mtnsms accounts.
   Bug fix for accounts defaulting to smsxtra.
0.3  27/04/01  New debug option outputs status data.
0.2  24/04/01  Re-attempts connection if server is busy.
0.1  23/04/01  Initial release.
*/
class jm_sms {

var $server;
var $cookies;
var $login;
var $curUrl;
var $debug = FALSE;
var $proxyServer;
var $proxyPort;
var $proxyUser;
var $proxyPass;
var $proxy = FALSE;

function getServer() { return $this-server; }
function setServer( $server ) { return $this-server = $server; }
function getCurUrl() { return $this-curUrl; }
function setCurUrl( $curUrl ) { return $this-curUrl = $curUrl; }
function getDebug() { return $this-debug; }
function setDebug( $debug ) { return $this-debug = $debug; }
function getProxyServer() { return $this-proxyServer; }
function setProxyServer( $proxyServer ) { return $this-proxyServer = 
$proxyServer; }
function getProxyPort() { return $this-proxyPort; }
function setProxyPort( $proxyPort ) { return $this-proxyPort = $proxyPort; }
function getProxyUser() { return $this-proxyUser; }
function setProxyUser( $proxyUser ) { return $this-proxyUser = $proxyUser; }
function getProxyPass() { return $this-proxyPass; }
function setProxyPass( $proxyPass ) { return $this-proxyPass = $proxyPass; }
function getProxy() { return $this-proxy; }
function setProxy( $proxy ) { return $this-proxy = $proxy; }

function jm_sms( $username

[PHP] cant redeclare class......

2001-10-20 Thread Sagar N Chand

Hi all,

I'm using jm_sms class in mysql 
dowhile($myrow=mysql_fetch_array($result)) loop.
the class is running fine for the first time. But when it is called for the 
second time i'm
getting an error saying cant redeclare the class. How to make this class 
work within
a loop.

i'm attaching the files if u want to look inside.

any help is highly appreciated.

thanks,

/sagar 

HTML
HEAD
TITLE Welcome to SMS reminder . . . . .  /TITLE

/HEAD

BODY
?
$db=mysql_connect(localhost,root,terminator);
mysql_select_db(smsdb,$db);

$da=getdate();
$datestamp=$da[year]-$da[mon]-$da[mday];
$custime= date(H:i);
list($ahour, $amin) = explode(:,$custime);
$sql=select * from sms where taskdate='$datestamp' and hour(tasktime)='$ahour' and 
minute(tasktime)='$amin' and delivered !='Y';
$result=mysql_query($sql);
if($myrow=mysql_fetch_array($result))
{   
// Example script using jm_sms class

$email = [EMAIL PROTECTED];// MTNSMS login email address
$password = rascal;   // MTNSMS password
$number = +91 . $myrow[cellno]; // GSM phone number to send to
$signature = SAGAR SMS;   // Signature for text message
$message = $myrow[smstext];;  // Content of text message
$debug = FALSE; // Debugging messages not displayed

// Add additional accounts if required
// $jm_sms-addLogin( [EMAIL PROTECTED], password2 );
// $jm_sms-addLogin( [EMAIL PROTECTED], password3 );

include( class.jm_sms.php );
$jm_sms = new jm_sms( $email, $password, $debug );

// Add Proxy Server details if required
// $jm_sms-setProxyServer( proxyserver );
// $jm_sms-setProxyPort( 81 );
// $jm_sms-setProxyUser( proxyusername );
// $jm_sms-setProxyPass( proxypassword );
// $jm_sms-setProxy( TRUE );

$jm_sms-sendSMS( $number, $signature, $message );  


}

?
/BODY
/HTML


?

/*
jm_sms 0.7 21/09/01
Copyright (C) 2001 James McGlinn [EMAIL PROTECTED]
jm_sms is a class for sending GSM text messages via the
free web-based service at http://www.mtnsms.com/.
Updates can be found at http://james.mcglinn.org/jm_sms/.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
(See http://www.gnu.org/copyleft/gpl.html)

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Changes:
0.7  21/09/01  Randomised login array for faster sending
  when over quota on first account.
  Speed optimisations in network code
   thanks to Mike Petrov ([EMAIL PROTECTED]).
0.6  06/06/01  Added check for incorrect login details.
0.5  31/05/01  Proxy support added
   thanks to Bas ([EMAIL PROTECTED]).
0.4  28/05/01  Provision for multiple mtnsms accounts.
   Bug fix for accounts defaulting to smsxtra.
0.3  27/04/01  New debug option outputs status data.
0.2  24/04/01  Re-attempts connection if server is busy.
0.1  23/04/01  Initial release.
*/
class jm_sms {

var $server;
var $cookies;
var $login;
var $curUrl;
var $debug = FALSE;
var $proxyServer;
var $proxyPort;
var $proxyUser;
var $proxyPass;
var $proxy = FALSE;

function getServer() { return $this-server; }
function setServer( $server ) { return $this-server = $server; }
function getCurUrl() { return $this-curUrl; }
function setCurUrl( $curUrl ) { return $this-curUrl = $curUrl; }
function getDebug() { return $this-debug; }
function setDebug( $debug ) { return $this-debug = $debug; }
function getProxyServer() { return $this-proxyServer; }
function setProxyServer( $proxyServer ) { return $this-proxyServer = 
$proxyServer; }
function getProxyPort() { return $this-proxyPort; }
function setProxyPort( $proxyPort ) { return $this-proxyPort = $proxyPort; }
function getProxyUser() { return $this-proxyUser; }
function setProxyUser( $proxyUser ) { return $this-proxyUser = $proxyUser; }
function getProxyPass() { return $this-proxyPass; }
function setProxyPass( $proxyPass ) { return $this-proxyPass = $proxyPass; }
function getProxy() { return $this-proxy; }
function setProxy( $proxy ) { return $this-proxy = $proxy; }

function jm_sms( $username

[PHP] only c if u r an indian...

2001-10-03 Thread sagar N Chand

hi,

any body out there from hyderabad. if u r a hyderabadi plese mail me.
v have got a lot of things to do.

thanks,
/sagar




Re: [PHP] Creating mailaccounts

2001-10-03 Thread sagar N Chand

work out with squrrelmail or basilix. If u want to set up won mail server then
you must have your head and fingers into linux.

/sagar

  - Original Message - 
  From: Bjornie 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, October 03, 2001 12:25 AM
  Subject: [PHP] Creating mailaccounts


  Hi everybody!

  I have a problem :/
  I just said yes to a project, which includes webmail. I know how to send
  mail and how to receive mail with imap, but can I in any way create a
  mailaccount on the server by using PHP? Or should I use any other language
  like Java/JSP or ASP (with a component)?`

  Hilfe! :)



  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]



Re: [PHP] A powerful editor!

2001-10-03 Thread sagar N Chand

coool man,
i've been using it since 2yrs.

/sagar

  - Original Message - 
  From: Dean Householder 
  To: Alex Shi ; [EMAIL PROTECTED] 
  Sent: Wednesday, October 03, 2001 2:27 AM
  Subject: Re: [PHP] A powerful editor!


  I used to use TextPad until I found EditPlus.  I'm also amazed by it's
  power.  It has more than I could even use including everything TextPad has
  and nicer colors for the different styles.  You can find it at
  http://www.editplus.com.

  Dean Householder
  Daylight Creations
  http://www.daylightcreations.com



  - Original Message -
  From: Alex Shi [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, October 01, 2001 6:08 PM
  Subject: [PHP] A powerful editor!


   Hello folks,
  
   Today, I found a very powerful editor, called TextPad. I said it is
   'powerful'
   because it can recognize syntax of php, html, java, css and also many
   many more great featuresmuch better that Windows Notepad. You can
   download and try. You need to take a few minutes to explore it and
  maximize
   its functionality for you.
  
   Here is the link:
   http://www.textpad.com/
  
   Alex
  
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  


  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP] sessions in php4

2001-10-01 Thread sagar N Chand

hi all,

i'm using a php4.0.6 with apache on win2k. when i register a session and immediately 
if i redirect to another
page the session seems not to be registered. eg.
?
session_start();
$value = 908;
session_register(value);
header(location : new location);
?

when i go to the new page i c that the session has not been reigstered.

but in case if i dont redirect from php rather use a html redirection code like click 
here to redirect then
it worked. why ?
?
session_start();
$value = 908;
session_register(value);
?
a href=newlocationclick here to redirect/a(this worked out )

any suggestions ?

/sagar




[PHP] sock prob

2001-09-29 Thread sagar N Chand

hi,

the socket() function is not working on win2k. any help?

thanx,
/sagar



Re: [PHP] updating a database (mysql)

2001-09-27 Thread sagar N Chand

try using the die function. it might help out.

or u can use the mysql_affected_rows functions. check out.
http://www.php.net/manual/en/function.mysql-affected-rows.php

/sagar

  - Original Message - 
  From: Joseph Bannon 
  To: PHP (E-mail) 
  Sent: Thursday, September 27, 2001 1:17 AM
  Subject: [PHP] updating a database (mysql)


  When I update my mysql database, is there a way with PHP to know what or if
  any records where updated?

  Joseph



  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]



Re: [PHP] session not working

2001-09-27 Thread sagar N Chand

session must be registered before any code is sent to the browser. so the syntax 
should be
?session_start();
session_register(uname);
session_register(pwd);
.


?
HTML
body bgcolor=#ff
html code here


/sagar

  - Original Message - 
  From: Krushna Kumar R 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, September 27, 2001 5:43 PM
  Subject: [PHP] session not working


  Hi,

  I wrote a program where the session gets created, but on subsequent page the session 
does not work or i could not retrieve the value kindly help me, I have put the coding 
below

  The operating system I use is Win98 and Personal Web Server, PHP version used is 
4.0.6

  File 1 : where the session is registered or created

  ?session_start();?
  HTML
  body bgcolor=#ff
  ?php

  session_register(uname);
  session_register(pwd);
  print Username var is - . $username.br;
  print Password var is - . $password.br;
  $uname=$username;
  $pwd=$password;
  print Uname var is - . $uname.br;
  print Pwd var is - . $pwd.br;

  echo session_is_registered(uname);
  echo session_name(uname);
   ?
  a href=file2.phpclick here to go to next page/a
  /body
  /HTML


  File 2 : Next page, the file where i check for the session variable's value

  ?session_start();
  print uname is - .$uname.br;
  echo Session is - .session_is_registered(uname).br;
  echo session name is - . session_name(uname).br;
  echo the session is $uname.br;
  ?
  a href=last.phpclick here go to last page/a

  Those are the coding i had used on the files i was trying to execute

  Regards
  Krushna Kumar




[PHP] php chat

2001-09-27 Thread sagar N Chand

i've seen many members seeking for a good php chat.
so my suggestion is use phpmychat. its the best php
chat i've ever come across. here is the site where u can
download your version. www.phpheaven.net
its also very easy to install and configure with good admin.

ejoy your chat server,

/sagar




[PHP] no of files in a folder....

2001-09-25 Thread sagar N Chand

hi all,

is there any way out to get the total no of files in a directory including its
subfolders ?

thanQ,,

/sagar




Fw: [PHP] Capturing several checkbox values

2001-09-25 Thread sagar N Chand


- Original Message - 
From: sagar N Chand 
To: John Day 
Sent: Tuesday, September 25, 2001 6:46 PM
Subject: Re: [PHP] Capturing several checkbox values


give each checkbox an individual name before you submit it.
In the next page put this code :

while(list($key,$value)=each($HTTP_POST_VARS)) {
echo ($key);  // if you want to print the name of the check box
echo($value); // if you want to print the values of the check box 
}

make sure that u use post method while submitting the form.

/sagar

  - Original Message - 
  From: John Day 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, September 25, 2001 3:00 PM
  Subject: [PHP] Capturing several checkbox values


  Hi,

  I have a page containing about 50 different checkboxes, the user can
  select as few or many as they like. When they submit the form I want the
  values/names of the checkboxes that they selected to be displayed on the
  next page, i.e. a thankyou page. Any help is much appreciated.

  JD

  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP] how to get the total disk space used in a directory

2001-09-23 Thread sagar N Chand

hi all,

is there any way to get the total disk space used under a directory
including its subdirectories and all the contents.

/sagar




[PHP] How to download files to the server

2001-09-21 Thread sagar N Chand

hi everyone,

I'm sorry that i'm not there on the list for a few days. Actually i'm
working for  a project in which i want to download some files to
the server(remote) if the user inputs the url of the file name.
hope u got me.

i want to make my server to do the downloads for me so that i can
later on download them to my idiot box.

hope i'll get some help

/sagar



[PHP] how to password protect files

2001-09-21 Thread sagar N Chand

i want to restrict the access of some files to a single user only whose names and pwds
are stored in mysql table and i'm authenticating them through my website. So what
i'm looking for is that the files should not be downloaded when their urls are typed in
the browsers.

/sagar




[PHP] mysql error on win2k

2001-09-21 Thread sagar N Chand

hi,

i have installed win2k and configured apache and php4.0.6 but
mysql is giving error 1016 or so.

why is this happening.

/sagar



[PHP] socket error

2001-09-07 Thread sagar

line10 - if (($sock = socket(AF_INET, SOCK_STREAM, 0))  0) {
echo socket() failed: reason:  . strerror($sock) . \n;
}

i'm getting an error saying
Fatal error: Call to undefined function: socket() in c:\program files\apache 
group\apache\htdocs\test\sock.php on line 10


can any one help

its urgent

/sagar



Re: [PHP] socket error

2001-09-07 Thread sagar

thanX sterling,

i've changed it to socket_open()  but the problem
still exists.

/sagar

- Original Message -
From: Sterling Hughes [EMAIL PROTECTED]
To: sagar [EMAIL PROTECTED]
Cc: php [EMAIL PROTECTED]
Sent: Saturday, September 08, 2001 1:54 AM
Subject: Re: [PHP] socket error


 On Sat, 8 Sep 2001, sagar wrote:

  line10 - if (($sock = socket(AF_INET, SOCK_STREAM, 0))  0) {
  echo socket() failed: reason:  . strerror($sock) .
\n;
  }
 
  i'm getting an error saying
  Fatal error: Call to undefined function: socket() in c:\program
files\apache group\apache\htdocs\test\sock.php on line 10
 
 
  can any one help
 

 The socket functions have been renamed as of php4.0.7

 Use socket_open() instead...

 -Sterling


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] mysql_fetch_array

2001-09-06 Thread sagar

hi,
just go thru ur code once u'll getout with the bug.

$myrowmysql_fetch_Array($result2);

what is $myrow and to which value should the left part should
compare.

try this :
?php
 file://Connect to db
 $db = mysql_pconnect(localhost,login,pass);
 mysql_select_db(database,$db);

 file://Check for the IP
 $result2 = mysql_query(SELECT ip FROM ip where ip = '$REMOTE_ADDR',$db);
$myrow=mysql_fetch_Array($result2);
if($myrow)
  //  if there is a record then the code goes here
else
  echo(print some text here);
?

/sagar


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 06, 2001 2:09 PM
Subject: [PHP] mysql_fetch_array


Can someone tell me what i'm doing wrong here?

?php
 file://Connect to db
 $db = mysql_pconnect(localhost,login,pass);
 mysql_select_db(database,$db);

 file://Check for the IP
 $result2 = mysql_query(SELECT ip FROM ip where ip = '$REMOTE_ADDR',$db);

while($myrowmysql_fetch_array($result2))
 {
echo Print some text here!;
 }
?

Basically I just want to print text if the IP address was not found in the
database, and if it was found then I want to print Print some text here!

Please help!
Thanks,
Nate



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] No moneymaking messages please

2001-09-05 Thread sagar

Hi everyone,

Why am i getting mails regarding the mlm businesses and
other personal money making businesses here ? I thought
this is a php mailing list. isnt it ? Lets have a fair game here.
Ok

/sagar




[PHP] how to connect to php from vb

2001-09-05 Thread sagar

hi,

can i connect to php from a vb appliation.
should this be asked elsewhere (if so pl
let me know)

/sagar




[PHP] messenger . . . ?

2001-09-05 Thread sagar



Hi geeks,

I want to give messenger service to my users. Can i do this ?
I'm running slack linux as server with php4 and mysql. 
I so where can i get the required src code both for client (Vb recommended)
and server programs.

/sagar





_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: mysql query . need help!!!!!

2001-09-04 Thread sagar

You cant use a select statement withoug using a table name.
check out this
$query = insert into classification(customername) (select customername from username 
where username='$username');

i cant answer ur second question, since i dont the
structure of your table

/sagar

original message 


Nope,
MySql doesn't allow select within select...
try making two seperate queries...

Lizlynch [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
i have two tables here, i want to insert the customername from the Username
table and insert it into the Classification table.
 is the below query correct cause i can't seem to get it to work.

 $query = INSERT INTO Classification (Customername)
 (SELECT Customername)
  FROM Username
  WHERE Username = '$Username');

i also want to insert a form value into the classification table at the same
time is that possible.

cheers liz lynch





Re: [PHP] How to replicate a table in Mysql?

2001-09-04 Thread sagar

Do u want to get the table data for backup ?
then try mysqldump -u user -ppwd -d database -t table   
somefile.txt;

check out once the manual for mysqldump syntax

/sagar

- Original Message -
From: Balaji Ankem [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 04, 2001 12:13 AM
Subject: [PHP] How to replicate a table in Mysql?


 Hi friend,
I want to replicate the table which is existed in database of Mysql.

 Thanks in advance.

 Regards
 -Balaji








 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Newbie Question: mysqldump via PHP

2001-09-04 Thread sagar

Did u mention the database name from where the table has to be
picked up.

check out the manual for correct syntax.

/sagar
- Original Message - 
From: Tony Frasketi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 04, 2001 11:25 PM
Subject: [PHP] Newbie Question: mysqldump via PHP


 Hello listers
 
 I'm trying to implement a mySQL database dump via PHP4 on a unix system
 as follows...
 
--
$result = exec(mysqldump -umyname --password=mypassword 
   tablename db.dump,$xarray,$status);
echo status[$status]br;
--
 
 I get the following error PHP error message...
 
status[127]
 
 and the file 'db.dump' has been created but it has 0 bytes.
 
-rw-r--r-- 1 nobody nobody 0 Sep 4 13:27 db.dump
 
 Although I can execute the mysqldump program from the unix shell and I
 get...
 
-rw-r--r-- 1 myname myname 23704 Sep 4 13:18 db.dump
 
 My questions are... 
 
  1. Can the mysqldump program be executed via PHP or not and if not
 can you please explain why?
 
  2. Is there another way of doing this via PHP?
 
 Thanks in advance
 Tony Frasketi
 P.S. Please answer direct, since I'm only subscribed to the digest.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Want mysql dump to be mailed to me....

2001-09-03 Thread sagar

Hi friends,

I have a remote server running my website. I've to make the backup of the mysql db
i'm using. i can use mysqldump for this. but i'm not sure where the file will be 
created
on the server and also i want to make that file to .zip and then download it to my pc.
how can i do this. Please help.

thanq,
/sagar




Re: [PHP] GUI for PHP

2001-08-30 Thread sagar

PHP is the cooolest language i have ever came across.
If u have a least knowledge with C u can rule over it in
a few days. And moreover what for v r all here ? if u
have any problem just drop in a post u'll have ur inbox
full of solutions from all over the world. this in one of (no
not one of the) the best mailing lists.

ok have a great programming,
/sagar


- Original Message -
From: Matthew A. Schneider [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Php-General (E-mail) [EMAIL PROTECTED]
Sent: Thursday, August 30, 2001 9:18 AM
Subject: Re: [PHP] GUI for PHP


 As someone who has little programming experience I'd have to say jump
right
 in and forget the GUI (I'm not aware of any IDE for PHP). PHP is pretty
 easy (to learn, becoming a master is something else I suspect) and there
is
 always outstanding support either by reading this newsgroup's archive or
 posting a question if you don't find an answer. I've been dabbling for
close
 to a year now and have yet had a need to post any questions. I have
 invariably found the solution after a quick search.

 There are a number of good books as well. For the novice (I speak with
some
 authority here) try Julie C. Meloni's PHP Essentials.

 If you're looking for an editor try PHPEd,
 http://www.soysal.com/PHPEd/index.php3

 And listen to what the experts (not me) have to say.

 Good luck,

 Matt

 - Original Message -
 From: Eric [EMAIL PROTECTED]
 To: Php-General (E-mail) [EMAIL PROTECTED]
 Sent: Wednesday, August 29, 2001 6:12 PM
 Subject: [PHP] GUI for PHP


  Does anyone have any suggestions for GUI PHP programming software.  I am
 new
  the PHP and would like to make the learning experience as quick and
simple
  as possible.
 
  Thanks for your help,
  Eric JT Harlow
  www.sisgrate.com
  Phone: 360 891 6991
  Fax: 360 891 6865
  Email: [EMAIL PROTECTED]
 
 
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]






_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP and PWS

2001-08-30 Thread sagar

put the entire php in c:\php
then intall it  from there so that it'll be installed there only.
check out for readme.txt or install.txt. it will contain
the instructions. you have to put a file like browscap.ini (or dll)
in c:\windows\system and the php.ini must be in c:\windows
now edit the php.ini to your needs. this file contains the root directory
of the php where u have to put the path to C:\php

hope this will help u,
/sagar

- Original Message -
From: frank clarke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 30, 2001 3:09 AM
Subject: [PHP] PHP and PWS


 I downloaded and installed PHP 4.06. The readme file
 says that the auto install prog setsup PHP to work
 with PWS and sets up php.ini. However, when I look at
 php.ini, there are no entries for these two parameters

 ; The root of the PHP pages, used only if nonempty.
 doc_root=
 ; The directory under which PHP opens the script using
 /~usernamem used only
 ; if nonempty.
 user_dir=

 is that good? I put in c:\inetpup\wwwroot for doc
 root, but it's still not working. Is there somethin
 I'm missin?

 thanx
 franx


 __
 Do You Yahoo!?
 Get email alerts  NEW webcam video instant messaging with Yahoo!
Messenger
 http://im.yahoo.com

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP and PWS

2001-08-30 Thread sagar

put the entire php in c:\php
then intall it  from there so that it'll be installed there only.
check out for readme.txt or install.txt. it will contain
the instructions. you have to put a file like browscap.ini (or dll)
in c:\windows\system and the php.ini must be in c:\windows
now edit the php.ini to your needs. this file contains the root directory
of the php where u have to put the path to C:\php

hope this will help u,
/sagar

- Original Message -
From: frank clarke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 30, 2001 3:09 AM
Subject: [PHP] PHP and PWS


 I downloaded and installed PHP 4.06. The readme file
 says that the auto install prog setsup PHP to work
 with PWS and sets up php.ini. However, when I look at
 php.ini, there are no entries for these two parameters

 ; The root of the PHP pages, used only if nonempty.
 doc_root=
 ; The directory under which PHP opens the script using
 /~usernamem used only
 ; if nonempty.
 user_dir=

 is that good? I put in c:\inetpup\wwwroot for doc
 root, but it's still not working. Is there somethin
 I'm missin?

 thanx
 franx


 __
 Do You Yahoo!?
 Get email alerts  NEW webcam video instant messaging with Yahoo!
Messenger
 http://im.yahoo.com

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]







_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] GET/POST name=value query var convention?

2001-08-30 Thread sagar

this might be u r  asking for

while(list($key,$value)=each($HTTP_POST_VARS))
{
echo($key .  =  . $value);
}

this should be in the page to where the variables r posted

/sagar

- Original Message -
From: Scott Thomason [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, August 03, 2001 4:48 AM
Subject: [PHP] GET/POST name=value query var convention?


Does anyone know of a more-or-less authoritative source that states that the
common convention for HTTP GET/POST queries is a series of name=value
pairs joined by  characters? I know I'm not just making this up, but I
need to persuade someone that it is a commonly-accepted practice. Before you
look... it's not in the HTTP RFCs.

Also...would it be accurate to say that life as a PHP and/or ColdFusion
programmer is easier if the aforementioned HTTP GET/POSTs are performed in
this manner? I know as a frequent user of Perl's CGI.pm module that I take
this convention for granted.
---scott


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] GET/POST name=value query var convention?

2001-08-30 Thread sagar

this might be u r  asking for

while(list($key,$value)=each($HTTP_POST_VARS))
{
echo($key .  =  . $value);
}

this should be in the page to where the variables r posted

/sagar

- Original Message -
From: Scott Thomason [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, August 03, 2001 4:48 AM
Subject: [PHP] GET/POST name=value query var convention?


Does anyone know of a more-or-less authoritative source that states that the
common convention for HTTP GET/POST queries is a series of name=value
pairs joined by  characters? I know I'm not just making this up, but I
need to persuade someone that it is a commonly-accepted practice. Before you
look... it's not in the HTTP RFCs.

Also...would it be accurate to say that life as a PHP and/or ColdFusion
programmer is easier if the aforementioned HTTP GET/POSTs are performed in
this manner? I know as a frequent user of Perl's CGI.pm module that I take
this convention for granted.
---scott


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Count

2001-08-30 Thread sagar

can do another way

$sql = select count(fieldname) from Products;
$result=mysql_query($sql);
$myrow=$mysql_fetch_row($result);
$countrows = $myrow[0]; ( or might be $myrow[1] check out)

will do the job

/sagar


- Original Message - 
From: David Robley [EMAIL PROTECTED]
To: Kevin P [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, August 30, 2001 6:06 AM
Subject: Re: [PHP] Count


 On Thu, 30 Aug 2001 08:16, Kevin P wrote:
  Hi
  I have counted some rows in MySQL and I need to know how to pull out
  the number of rows.
  SELECT COUNT(*) AS myCount FROM Products
 
  Thanks
  Kevin
 
 $query = SELECT COUNT(*) AS myCount FROM Products;
 $result = mysql_db_query($database, $query);
 $row = mysql_fetch_array($result);
 extract($row);
 echo $myCount;
 
 might do the trick; unless I've left a syntax error in there :-)
 
 -- 
 David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
 CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  
 
I'm so broke, I can't even pay attention.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 



Fw: [PHP] GET/POST name=value query var convention?

2001-08-30 Thread sagar


- Original Message -
From: sagar [EMAIL PROTECTED]
To: Scott Thomason [EMAIL PROTECTED]
Cc: php [EMAIL PROTECTED]
Sent: Thursday, August 30, 2001 4:22 PM
Subject: Re: [PHP] GET/POST name=value query var convention?


 this might be u r  asking for

 while(list($key,$value)=each($HTTP_POST_VARS))
 {
 echo($key .  =  . $value);
 }

 this should be in the page to where the variables r posted

 /sagar

 - Original Message -
 From: Scott Thomason [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
 [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Friday, August 03, 2001 4:48 AM
 Subject: [PHP] GET/POST name=value query var convention?


 Does anyone know of a more-or-less authoritative source that states that
the
 common convention for HTTP GET/POST queries is a series of name=value
 pairs joined by  characters? I know I'm not just making this up, but I
 need to persuade someone that it is a commonly-accepted practice. Before
you
 look... it's not in the HTTP RFCs.

 Also...would it be accurate to say that life as a PHP and/or ColdFusion
 programmer is easier if the aforementioned HTTP GET/POSTs are performed in
 this manner? I know as a frequent user of Perl's CGI.pm module that I take
 this convention for granted.
 ---scott


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]





_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Fw: [PHP] Count

2001-08-30 Thread sagar


- Original Message - 
From: sagar 
To: php 
Sent: Thursday, August 30, 2001 4:22 PM
Subject: Re: [PHP] Count


can do another way

$sql = select count(fieldname) from Products;
$result=mysql_query($sql);
$myrow=$mysql_fetch_row($result);
$countrows = $myrow[0]; ( or might be $myrow[1] check out)

will do the job

/sagar


- Original Message - 
From: David Robley [EMAIL PROTECTED]
To: Kevin P [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, August 30, 2001 6:06 AM
Subject: Re: [PHP] Count


 On Thu, 30 Aug 2001 08:16, Kevin P wrote:
  Hi
  I have counted some rows in MySQL and I need to know how to pull out
  the number of rows.
  SELECT COUNT(*) AS myCount FROM Products
 
  Thanks
  Kevin
 
 $query = SELECT COUNT(*) AS myCount FROM Products;
 $result = mysql_db_query($database, $query);
 $row = mysql_fetch_array($result);
 extract($row);
 echo $myCount;
 
 might do the trick; unless I've left a syntax error in there :-)
 
 -- 
 David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
 CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  
 
I'm so broke, I can't even pay attention.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 



[PHP] cant connect to mysql

2001-08-28 Thread Sagar N Chand

Hi geeks,

I have a strage problem over here. I developed a site which runs fine at my home.
When i hosted it on to the remote server it is giving an error saying cant connect
to mysql. the error is like this
 
Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in 
/home/httpd/html/procbit/login.php on line 17

the line 17 in my code is as follows:
$db=mysql_connect(localhost,root,password);

please help me out of this problem.
Please reply me at [EMAIL PROTECTED] 

thank you all
sagar





[PHP] Compiling PHP with IMAP

2001-06-30 Thread Sagar Chand

Hiall,
I am compiling php4.0.5 with imap support as a DSO
for APache. with 
./configure --with-apxs. --with-imap
And I got an error saying rfc822.h missing.
So I downloaded the latest Imap Beta 2001 tilldate
And cp'd the c-client to /usr/include
And after compiling the imapd and ipop3d
I cp'd the imapd and ipopd to /usr/sbin
and activated them thru inetd.conf (I'm on RH6.2)

Now configure --with-imap is giving a different error
like this
cannot find imap Library, Check your imap
installation
But the imap server is working fine.

Any suggestions ?
/Chandu


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] how to install pws on win2k

2001-06-20 Thread sagar chand



hi everyone,

I have recently shifted from win98 to win2k. the 
pws i'm using is not installing on win2k. Is there any remedy 4 
this?

thanks for all u guys who help here with this 
mailing list.

bye
sagar