[PHP] server problems

2002-06-18 Thread Kris Vose

I just uploaded a php driven web site that use text files to archive data to a unix 
server.  When I went to try and add another archive the script fails without a 
warning.  It does not store the data in the text file and it does not add another 
archive.  I wrote this application about 4 months ago when I was just learning php and 
I have found since then that mysql is the best way to store data! duh...  Anyway I was 
wondering if my permissions are screwed up on the unix server, or if there is 
something that I am overlooking here!  I do not really want to rewrite the code!  I 
spoke with the administrator of the server and he has no idea.  They are using PHP 
4.0.2B and we are using PHP 4.1.2  Anyway...thanks in advance.

Kris 

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




[PHP] form post

2002-06-12 Thread Kris Vose

Is there a way to post input types that are "hidden"  with out using a html form in 
php?  I know you can do it in java script with Form.submit().  

So... if I have three hidden fields can I "post" them without pressing a button that 
uses a form by using a php function?

Thanks in advance.

Kris

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




[PHP] download link

2002-06-11 Thread Kris Vose

are there any php functions that handle downloads?  For Instance I want to create a 
link that contains a url string.  In this string a variable is defined as a file.  
This file will be downloaded when the user clicks on the link.  How do you handle this 
file in php?  Is there a function that will do this.  I have tried the copy function 
but it does not seems to work.

Kris

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




[PHP] download

2002-06-11 Thread Kris Vose

are there any php functions that handle downloads.  For Instance I want to create a 
link that contains a url string.  In this string a variable is defined as a file.  
This file will be downloaded when the user clicks on the link.  How do you handle this 
file in php?  Is there a function that will do this.  I have tried the copy function 
but it does not seems to work.

Kris

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




[PHP] url string

2002-06-10 Thread Kris Vose

I am looking for a way to pass two variables in a url string to a php script.  I 
originally was using java script to acomplish this because once the user is redirected 
they can not press the back button to get back to the original page.  It looks like 
this:
?>
 window.location = "somefile.php?user=&pass="
 window.location = 
'somefile.php?user=$username&pass=$userpass'";

Unfortunately both ways do not work.  In the first instance the script jumps to the 
window location but does not pass php variables into the url string.  In the second 
instances the java script does not even compile.

Is there a way to do this with php?...html?...javascript?

...I think that window.location does not except url string variables or something.  
Anyway if anyone can help it would be appreciated.  Thanks.


Kris

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




[PHP] diplaying the path

2002-05-31 Thread Kris Vose

Is there a variable/function in php that will display the url location of the 
hyper-link that brought them to the current page.  Thanks in advance.
 
Kris Vose 



[PHP] function over loading?

2002-05-06 Thread Kris Vose

Can you practice function over-loading in php?
 
Kris



[PHP] function over loading?

2002-05-06 Thread Kris Vose

Can you practice function over-loading in php?
 
Kris



RE: [PHP] Mailing to numerous with mail()

2002-04-24 Thread Kris Vose

Do this:
 
$to = "[EMAIL PROTECTED], [EMAIL PROTECTED], jonmundur@ mail.is";
 
 
-Original Message-
From: David Orn Johannsson [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 24, 2002 10:31 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Mailing to numerous with mail()
 
I'm trying to send an email useing mutible email addresses, could any one tell me why 
this isn't working, it works when I only use one address ($to = [EMAIL PROTECTED] 
 ) 
but not when I use the following code.


 
$to  = "[EMAIL PROTECTED]", " ;
$to .= "[EMAIL PROTECTED]" . ", " ;
$to .= "jonmundur@ mail.is";
 
$subject = "Subject";
$body = "Body";

mail($to, $subject, $body, "From: [EMAIL PROTECTED] ");
 
 
Davíð Örn Jóhannssson
Vefforritari

Atómstöðin hf.
Garðastræti 37
101 Reykjavík

sími: 595-3643
fax: 595-3649
[EMAIL PROTECTED]  
http://www.atom.is  


 



[PHP] deleting lines in a textfield

2002-04-22 Thread Kris Vose

How would you go about deleting a specific line in a textfield via PHP?  For example, 
I want to delete line 2 only and save the changes.  How would I go about doing this 
using fopen and fwrite?
š
Kris



[PHP] deleting line in a text field

2002-04-22 Thread Kris Vose

How would you go about deleting a specific line in a textfield via PHP?š For example,š 
I want to delete line 2 only and save the changes. šHow would I go about doing this 
using fread and fwrite?
 
Kris



[PHP] smtp relay problem

2002-04-16 Thread Kris Vose

I am having problems with my mail server. šWhen I use the mail function in php it 
resets the domain of the from: address when the script is executed.
 
For example: when the from: address is set to [EMAIL PROTECTED] it resets it to the mail 
servers domain [EMAIL PROTECTED] šI believe this is due to smtp relaying being 
blocked.š Is there anyway around this problem in php or is the only solution to 
unblock smtp relaying? šAlso...this may not be the problem at all.
 
All input is appreciated.š Thanks
 
Kris Vose



[PHP] refresh

2002-04-05 Thread Kris Vose

I want to be able to refresh my browser window after a submission to a database.  Is 
there a reliable function out there that can accomplish this?
 
Kris



[PHP] register session

2002-04-03 Thread Kris Vose

I am trying to register a session after verification of username and password.
 
It looks like this:
 
session_start();
If ($name = $aa) && ($username = $ab)
{
session_register("valid_user");
echo "window.location=\'admin_.php'\";
}
else
{
echo "Your username/password is incorrect";
}
 
On each page that I want secure I include a script that checks for the 
session_register().  It looks like this:
 
session_start();
global $valid_user;
 
if (session_is_registered("valid_user"))
{
echo "you are registered";
}
else
{
echo "you are not registered";
}
 
This code is not working and it sends a warning message like this: Warning: Cannot 
send session cache limiter - headers already sent (output started at 
/var/www/focus-capital/BetterBus/1/admin_.php:7) in 
/var/www/focus-capital/BetterBus/1/admin_.php on line 126
you are registered 1 - Send Mail
 
I have not used sessions before and I am wondering if I am doing some wrong with the 
syntax?
 



[PHP] for loop problem

2002-03-20 Thread Kris Vose

I have a problem with a piece of code that uses the mail function in a for loop.  It 
sends out mail to all the users in the database but it has a problem with attaching 
their specific name into the message.  What happens is the first user in the database 
will get their name in the e-mail (Dear John,).  Then the second user in the database 
will get the last users name and their name in the e-mail (Dear John, Dear Mike) 
...and so on and so forth.
 
How do I fix this problem?  Your help is appreciated.
 
Here is the code:
 
If ($button != "")
{
$t = mysql_query("SELECT * from AddExisting");
$number_of_customers = mysql_num_rows($t);

for($i=0; $i<$number_of_customers;$i++)
{
$r = mysql_fetch_array($t);
$email = $r["EMAIL_ADDRESS"];
$cusname = $r["Name"];

$to = $email;
$subject = "hello";
$message = "Dear $cusname,".$message;
$fromaddress = "[EMAIL PROTECTED]";

mail($to, $subject, $message, $fromaddress);
}//end of for
}//end of if



[PHP] regular expression

2002-03-19 Thread Kris Vose

How would you write a regular expression that defines a phone number:  ex. 
(123)123-1234.
 
In other words how would you check to see if there were three numerics surrounded by 
(), then three numerics with a "-", then four numerics.
 
 
This is what I have so far as a regular expression.
 
^[(000-999)]+[000-999\-]+[-]+$
 
I am using this in an if statement like this:
 
If (!eregi("^[(000-999)]+[000-999\-]+[-]+$", $PHONENUMBER)
{
echo "This phone number is not valid";
}
 
 
Any help is appreciated.
 
Kris Vose



[PHP] contents of fetch array into a string

2002-03-06 Thread Kris Vose

I have a problem with reading the contents of $r[1] into a string called = $mail.  
Does anyone have any suggestions?  Any help is greatly appreciated.
 
Kris Vose
 
 
if ($czero != "")
{
 
$t = mysql_query("SELECT * FROM AddExisting");
 
$number_of_customers = count($t);
 
while($r = mysql_fetch_array($t))
{
extract($r);
 
  for ($i = 0; $i<$number_of_customers; $i++)
  {
echo $r[1].", ";
  }
 
}
 
$mail = ' ';
foreach($r[1] as $mailline)
{
$mail.=$mailline;
}
 
}
 



[PHP] value of an array into a sendmail function

2002-03-05 Thread Kris Vose

I want to take the value of an array and define it as $message.  This variable will be 
called in the sendmail function mail().  Here is what I have so far. (does not work!) 
Can anyone help me with this problem?
 
$automail = file("DOCUMENT_ROOT/BetterBus/1/AutoEmail.txt");
$number_of_lines = count($automail);
 
for ( $i=0; $i<$number_of_lines; $i++)
{
$auto = explode("\n", $automail[$i]);
echo $auto[0]."\n";
}
 
$to = $EMAILADDRESS
$subject = "Thank You for your submission!";
$message = eval($automail);
$fromaddress = "[EMAIL PROTECTED]";
 
mail($to, $subject, $message, $fromaddress);
 
 



[PHP] value of an array into a sendmail function

2002-03-05 Thread Kris Vose

I want to take the value of an array and define it as $message.  This variable will be 
called in the sendmail function mail().  Here is what I have so far. (does not work!)

$automail = file("DOCUMENT_ROOT/BetterBus/1/AutoEmail.txt");
$number_of_lines = count($automail);

for ( $i=0; $i<$number_of_lines; $i++)
{
$auto = explode("\n", $automail[$i]);
echo $auto[0]."\n";
}

$to = $EMAILADDRESS
$subject = "Thank You for your submission!";
$message = eval($automail);
$fromaddress = "[EMAIL PROTECTED]";

mail($to, $subject, $message, $fromaddress);

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