[PHP] how to check if the required fields were filled in without the text in them?

2001-07-12 Thread Aniceto Lopez

Hola everybody;
this is a simple form to send a mail via php, check if a field
was filled in and prompt an error msg (if not) is easy but
when the Submit button is presssed the text in the rest of
the fields dessapear.
How to avoid fields draining if one of them is no filled in?

thanks

Ani López



mail send




for: 
your name: 
your email: 
tex:




";
$headers .= "\nContent-Type: text/html; charset=iso-8859-1\n";
$headers .= "X-Mailer: PHP\n";

if ($submit) {
 mail("$for", "$subjet", "$text", "$headers");
 }
?>






[PHP] Thanks [ form input checking problem ]

2001-07-13 Thread Aniceto Lopez

Thanks everyone helped me (Aaron Bennett specialy) with the
"input checking problem". Maybe Rip's idea of mixing javascript
and php is a good one but I'm newbie and I'm not sure which
languaje takes the control first or how the interact.

Anyway I'll work in that direction later

Hasta la proxima

Aniceto López


here is the "form that sends a mail but chek if all the inputs
were filled in" in case anybody wants to use it



mail send




For: 
Your name: 
Your email: 
Subjet: 
Text: 



  

";
$headers .= "\nContent-Type: text/html; charset=iso-8859-1\n";
$headers .= "X-Mailer: PHP\n";

if ($submit)
{
if ((!$for) || (!$name) || (!$mail) || (!$subject) || (!$text))
{
$submit = false;
if (!$for) { $errormsg = "Recipient email"; }
if (!$name) { $errormsg .= "Your name"; }
if (!$mail) { $errormsg .= "Your email"; }
if (!$subject) { $errormsg .= "The subject"; }
if (!$text) { $errormsg .= "Some text"; }
print("Following missed data");
print($errormsg);
} else {
print("Mail sended!");
mail("$for", "$subject", "$text", "$headers");
}
}
?>





-- 
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] Free Hosting Sites

2001-07-16 Thread Aniceto Lopez

some free host servers PHP + mySQL

http://www.jumpworld.net/
http://hosting.datablocks.net/
http://www.coolfreehost.com/
http://www.nexen.net
http://free.any.za.net

Ani López
http://www.lamundial.net
Visit us, download our music




-- 
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] fill in inputs control (part II) PHP + JavaScript

2001-07-17 Thread Aniceto Lopez

Hello again:
some one told me to control the "input" and "text areas" right filling in
from a form using java script and this is what I'm trying but problems
appear.

Options:

the javascript is doing it's work but nothing is inserted in the db if using


the javascript checks (only) the filling in of the first input and after
this the form is
submited without more checking, empty fields are submited


some help please?
thanks in advance

Ani López
http://www.lamundial.net
Visit us, download and spread our music

-- opinion.php file ---


PHP + JavaScript fill in inputs control

function envia(){
 if (document.opina.name_in.value.length < 1){
 window.alert('Write your name');
 } else if (document.opina.email_in.value == "" ||
document.opina.email_in.value.indexOf('@', 0) == -1){
 window.alert('Write your email');
 } else if (document.opina.text_in.value.length < 1){
 window.alert('Your opinion please');
 } else {
 document.opina.submit();
 }
}










  

  name 
  email 
  text 
  
 
  






 
  $nombre_db
  $fecha_db
 
 
  $texto_db
 
 
 ");
 }
 $dbdecnx = mysql_close ($dbcnx);
?>





-- 
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] a goog "whatever you want" editor

2001-07-19 Thread Aniceto Lopez

My opinion: "UltraEdit" https://www.ultraedit.com

cheap, powerfull, totally configurable, ftp included,
http://www.ultraedit.com/products/features.html
free tag list (any code), word files, macros

I use it for html, xml, xsl, wml, php, javascript...



Ani Lopez
http://www.lamundial.net
visit us, download, spread our music



[PHP] (in spanish) a goog "whatever you want" editor

2001-07-19 Thread Aniceto Lopez

[sorry amigos, this is in spanish]

hola Mauricio:
bien, en esto de los gustos sobre soft cada uno tiene sus preferencias
hay alguna web donde probar el Emacs este?

lo que daria por unos buenos tacos y unos chapulines
rebien tostaditos con una corona bien fria!!!

¿de Veracruz?

(hace 5 años visite Mejico por 6 semanas, 5.000 km recorrí)

salud

Aniceto Lopez
Barcelona Spain


-- 
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] hosting

2001-07-26 Thread Aniceto Lopez

Nice one: http://100megswebhosting.com

- 100 MB of disk space
- 3 GB of bandwidth
- 10 subdomains 
- 10 FTP accounts 
- control panel
- cgi-bin
- built-in CGI scripts
- PHP 4
- FrontPage extensions
- mySQL
- 10 POP e-mail accounts
- unlimited e-mail forwarding
- unlimited autoresponders
- SSL capable
- shopping cart
- Real Audio/Video
- telnet/SSH
- password protected directories
- raw access logs
- full website statistics
- search engine submission

$10 per month, $55 for 6 months, $100 per year 


-- 
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] hosting

2001-07-26 Thread Aniceto Lopez

Yes I use http://100megswebhosting.com to host the web sites
of my customers, commerical purposes also and it works fine 


-- 
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] Euro asccii value

2001-07-27 Thread Aniceto Lopez

Ascii Euro value: Dec# 128 Hex# 80 if its on the font



[PHP] session_start() problem

2001-08-13 Thread Aniceto Lopez

lines in the acceso.php file:

27  session_name(primera);
28  session_start();
29  session_register("sesionvar");
30  $HTTP_SESSION_VARS["sesionvar"] = "fulanito";

what I get in the browser:

Warning: Cannot send session cookie - headers already sent by (output
started at /public_html/php/acceso.php:8) in /public_html/php/acceso.php on
line 28

Warning: Cannot send session cache limiter - headers already sent (output
started at /public_html/php/acceso.php:8) in /public_html/php/acceso.php on
line 28

some help please
thanks in advance


-- 
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] thanks all sesion_start problem

2001-08-13 Thread Aniceto Lopez

Ok. Richard was right, the php code was placed in the middle
of the html. I place it at the beguining oh the file (before html)
and it works. Thanks

Thanks also Daniel for your advice:
"first use session_start() and than session_name"


> Did you make sure everything below is BEFORE the html tag?
> Also you can just set the variable $sesionvar like this:
> $sesionvar = "fulanito";
> instead of
> $HTTP_SESSION_VARS["sesionvar"] = "fulanito";


-- 
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] session_start() part II

2001-08-13 Thread Aniceto Lopez

ok, let's have this in the right place
in a file named startsesion.php i.e.

session_start();
session_name("mysesion");
session_register("myvar");
$myvar = "whatever";

a SID is generated autmaticaly


I've been trying to echo the values of the var defined
and the SID generated in another php file

 not working
 not working
 not working
 not working

 not working

how can I get this values?

thanks, gracias




-- 
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] session_start() part III

2001-08-13 Thread Aniceto Lopez

I guess Renze, I have to use session_start() in the file where
I want to output data from the session

All this questions about session are generated because I want
to control the acces to some of the web pages in a site so only
accesible to registered visitors.

Ok name user and password are stored in a db (mysql), after
password verification sesion is started, temporal storage of  some
values (PHPSESSID i.e.) and I guess in the begining of every
restricted page this temporal info shoul be checked to make the
page visible or not but if the visitor closes the browser the sesion is
over, session_destroy is this necessary?

thanks

remind me to invite you to have a beer next time you come to barcelona



-- 
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] session_questions() part IV

2001-08-13 Thread Aniceto Lopez

Renze asked:
"how would you detect whether or not someone has
closed his browser? (session is over then)"

Do I realy need to know this to let or not a registered
user navigate some restricted web pages?


Aniceto Lopez





-- 
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] session_questions("end")

2001-08-14 Thread Aniceto Lopez

thanks everybody helping to clear my mind with "sessions" affair.

many people asking about this so two possible problems:
coders don't read manuals carefully or the info there is not
so clear.

[ trying to help a little bit newbies like me, as soon as I finish this
  "navigation access for logged users" work I'll post the php files ]

aniceto lopez
http://www.lamundial.net
visit us, download and spread our music


-- 
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] Sending Mail via SMTP

2001-09-05 Thread Aniceto Lopez

I would like to send mail via SMPT and I guess
some socket scripting should be done.

any example? any help?

thanks

Ani Lopez
http://www.lamundial.net



-- 
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] Session variables - Users online

2001-09-07 Thread Aniceto Lopez

put this code in the home web page

$conn user online";
  } else {
  echo"$conn users online";
  }
?>

and create this table in you db to hold the necesary values

#
# Table structure for table 'uonline'
#

CREATE TABLE `uonline` (
  `caduc` int(15) NOT NULL default '0',
  `ip` varchar(40) NOT NULL default '',
  `file` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`caduc`),
  KEY `ip` (`ip`),
  KEY `file` (`file`)
) TYPE=MyISAM;

this is working good in my site

Aniceto Lopez
http://www.lamundial.net
download and spread our music


-- 
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] limiting rows and pages like google

2001-09-12 Thread Aniceto Lopez

paging results:

this is tha idea
page 1 - SELECT * FROM yourtable ORDER BY id DESC LIMIT 0, 20
page 2 - SELECT * FROM yourtable ORDER BY id DESC LIMIT 21, 20
page 3 - SELECT * FROM yourtable ORDER BY id DESC LIMIT 41, 20
...
so
$next = 0 //starting
SELECT * FROM yourtable ORDER BY id DESC LIMIT $next, 20
$next = $next + 20 //next pages
till $next > max(id)

is this helping you?

Ani Lopez
www.lamundial.net
download and spread our music 


-- 
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] big problems , help !!!

2001-09-14 Thread Aniceto Lopez

Nikola:
I've been working this way and it's working good.
you are using Dreamweaver I guess and I just use a text editor
not a HTML wysiwyg writer
so no unnecesary code in my web pages and total control


#news {position:relative; left:0; top:0; width:505; height:180;
overflow:hidden; clip:rect(0,510,180,0); visibility:hidden}









Ani Lopez
www.laMundial.net
download and spread our music



-- 
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] Thumbnail gallery

2001-09-14 Thread Aniceto Lopez

Daniel, if you like mine
http://www.lamundial.net/pics/view.php
tell me and I'll post the necesary php files




Ani Lopez
www.lamundial.net
download and spread our music


-- 
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] Have y'all seen this?

2001-09-14 Thread Aniceto Lopez

they are right!
PHP is a drug, once you begin to use it impossible to leave he habit!
no other web programing languaje gives you more for free so let me abuse of
it

Ani Lopez
www.lamundial.net
download and spread our music


-- 
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] mySQL tutorials + PHP

2001-09-17 Thread Aniceto Lopez

Building a Database-Driven Web Site Using PHP and MySQL
http://www.mysql.com/articles/ddws/index.html

is this what you are looking for?

Aniceto Lopez
www.laMundial.net
download and spread our music



-- 
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] Getting IP address

2001-09-19 Thread Aniceto Lopez

this is working for me $REMOTE_ADDR


Aniceto Lopez
www.laMundial.net
download and spread our music


-- 
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] image gallery

2001-09-20 Thread Aniceto Lopez

some days ago someone, I can't remenber, asked
how to do an image gallery so here is mine

available for downloading: www.lamundial.net/bol/img_gallery.zip
also posted in http://www.weberdev.com
you can see it working at: www.lamundial.net "fotos" section

when a thumb is clicked pops up a new window with
the sice of the photo displayed. no database is required,
names of the images are readed from a text file

Configurable
 $data_file = "photolist.txt";   //name of the text file
 $thumbnail_dir = "thumbs/"; //folder containing the thumbs
 $num_rows = 2;
 $photos_per_row = 2;

Credits:
Original code from an article written by: Todd Kennedy
<[EMAIL PROTECTED]>
Article:
http://hotwired.lycos.com/webmonkey/01/27/index3a.html?tw=programming
Put all toghether in working files and fixing some little errors Aniceto
Lopez <[EMAIL PROTECTED]>



Ani Lopez
www.lamundial.net
download and spread our free music


-- 
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] image gallery

2001-09-20 Thread Aniceto Lopez

some days ago someone, I can't remenber, asked
how to do an image gallery so here is mine

available for downloading: www.lamundial.net/bol/img_gallery.zip
also posted in http://www.weberdev.com
you can see it working at: www.lamundial.net "fotos" section

when a thumb is clicked pops up a new window with
the sice of the photo displayed. no database is required,
names of the images are readed from a text file

Configurable
 $data_file = "photolist.txt";   //name of the text file
 $thumbnail_dir = "thumbs/"; //folder containing the thumbs
 $num_rows = 2;
 $photos_per_row = 2;

Credits:
Original code from an article written by: Todd Kennedy
<[EMAIL PROTECTED]>
Article:
http://hotwired.lycos.com/webmonkey/01/27/index3a.html?tw=programming
Put all toghether in working files and fixing some little errors Aniceto
Lopez <[EMAIL PROTECTED]>



Ani Lopez
www.lamundial.net
download and spread our free music



[PHP] about image gallery

2001-09-20 Thread Aniceto Lopez

thanks Daniel
yours doen't need a text file with the image file names
but this is usefull when you want to establish the order
thumbs are shown

little trick:
both, big imgs and thumbs should be same file type but
I use jpg for big ones and gif for thumbs. after procesing
them (thumbs) in image software I change the .gif extension
to .jpg and it works!
Gif is better for little images using a few colors so little image size


Aniceto Lopez
www.lamundial.net
download and spread our free music


-- 
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] about image gallery

2001-09-21 Thread Aniceto Lopez

You are right Daniel, working with no text file for the img file names
represents less work to update the gallery but I'm working on this idea
 text file ---> picture.jpg, description of the picture
so a txt file is needed

I would be glad to now when your "page numbers for faster navigation"
image gallery is ready

saludos

Aniceto Lopez
www.lamundial.net
download our free music


-- 
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] fired!

2001-09-21 Thread Aniceto Lopez

dot.com crissis reaches me!!
I've been fired, anyway I'll be in that nice PHP list

(any job for me?)

Aniceto Lopez
www.laMundial.net
download our free music


-- 
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]