[PHP] Stuck in implementing PHP with HTML
Hi All, Hi i am a newbie in PHP environment. First of all my sincere regards to all behind developing this fabulous language & of-course to every one who are sharing their knowledge & views making others comfortable with the same. Coming to the point i am trying to create a contact form applying server side validation for my site using PHP. Here the problem had arises. I have designed a from & applied validation referring the tutorials available on web but unfortunately it is not working. I am applying the validation & trying to show the error in the same field if there Here i am sending you the code snippet what i am trying to do. Your help is highly appreciable. kindly help me out. *form.php:-* "Name","number"=>"Number","email"=>"Email","detail"=>"Comment"); foreach($required as $field => $label){ if(!$_POST[$field]){ $warnings[$field] = "Required"; } if($_POST["email"] && !eregi ("^[_a-z0-9-]+(\.[_a-z0-9-]+)*...@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$",$_POST["email"])) $warnings["email"] = "Invalid Email Format"; if($_POST["number"] && !eregi ("^[0-9]{10}$",$_POST["number"])) $warnings["number"] = "Invalid number Format"; if(count($warnings)>0){ ?> Contact Form:- Name value="">> Number value=""> Email value=""> Comment value=""> *submit.php* ".mysql_error().""); mysql_select_db("dbname",$con) or die (mysql_errno().": ".mysql_error().""); $insert_query = 'insert into GUESTBOOK (NAME,NUMBER,EMAIL,DETAIL) values( "' . $_POST['name'] . '", "' . $_POST['number'] . '", "' . $_POST['email'] . '", "' . $_POST['detail'] . '" )'; mysql_query($insert_query) or die ('Error updating database'); mysql_close($con); ?> header('Location: http://www.sweetsamaira.com/guest.php'); Kindly help me out. Thanks in advance. -- Kind Regards, Vivek Jadiya
Re: [PHP] Double method access (Hi everyone! :))
I also totally agree with Larry that if used judiciously then method/object chaining can give great results, else otherwise, can create a lot of overhead in the application. Netemp On Sat, Mar 5, 2011 at 1:14 AM, Paola Alvarez wrote: > Hi, thanks a lot Alex and Larry for your very clear answer! > > Paola, > > On Fri, Mar 4, 2011 at 4:33 PM, la...@garfieldtech.com < > la...@garfieldtech.com> wrote: > > > That's called method chaining. ->getColumns() will get called on the > > object returned by ->getTable(). That is, getTable() returns an object > > (presumably representing an SQL table, I guess), and that object has a > > getColumns() method, which you call. > > > > This is an extremely common style in Javascript code that has been > gaining > > widespread use in PHP OO circles in recent years. If leveraged properly > it > > can create very compact, very readable, very powerful code. (And if done > > stupidly can lead to a horrid mess, but that's true of any coding style.) > > > > --Larry Garfield > > > > > > On 3/4/11 1:25 PM, Paola Alvarez wrote: > > > >> Hi there!, > >> I have been reading this list before but this is my first post. > >> Reading some code from Symfony I got this: > $this->getTable()->getColumns() > >> ...when you can use this double method access?, I used before the > >> regular $this->getTable(), but two?. I mean I have been trying but I got > >> an > >> error* > >> > >> * Fatal error: Call to a member function ... on a non-object in ... > >> > >> Thanks! > >> > >> Paola > >> > >> PS: BTW, sorry my english isnt really good > >> > >> > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > >
[PHP] store images in mysql tables
can i store images in mysql table using php , is it possible if yes then pl show me where i can read more about it [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with https
i have apache 1.3.26 on php 4.2.3 everything else is running fine except "https//whatever" when i am trying to access the files thru apache , I have looked for SSL properties in httpd.conf and everything is properly enables( that what i think ) . The error generated is "page not found" and when i am running without "s" in the "https://"; the page is being displayed properly , Do any1 have any idea vivek kedia [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] shaun@mania.plus.com
use Mysql front its a GUI for Mysql and make these kinds of tasks very easy vivek __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help on php dbg
Hello all I am new to programming I need a urgent help, I recently installed PHP 4.2.3 ( ON win me , running apache 1.3.22 ) from the install shield downloaded from php.net. Earlier my dbugger used to work but now it doesnt work, the nupshere phped gives the following error -- -- Security Alert! The PHP CGI cannot be accessed directly. This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive. For more information as to why this behaviour exists, see the manual page for CGI security. For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page. == I will b highly obliged if any1 can give me step by step instructions how to make the dbugger run, Thanx in advance vivek __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail filtering ... procmail + php query
hi, after looking at the imap functions...i was wondering how the mail filtering works... afaik procmail does that...but is there any std way / php functions to set the filters? i know the filtering depends on mail server...but if we assume that it is done using procmail... is it somehow possible to write some php code that will take the input from user and generate the .procmailrc file? what problems could occure? any ideas? thanks - Vivek - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages!
[PHP] PHP --info giving segmentation fault
Hi All, I am using CentOS 5.3-x8664. I installed PHP and Apache httpd. The following are the version informations present on the system: #httpd -v Server version: Apache/2.2.3 # php -v PHP 5.1.6 (cli) (built: Jan 21 2009 01:45:01) The problem is when accessing through web page it is giving blank, i am getting the following error messages in /var/log/httpd/error_log: ... ... [Wed Jul 01 00:48:58 2009] [notice] child pid 4408 exit signal Segmentation fault (11) [Wed Jul 01 00:49:10 2009] [notice] child pid 4411 exit signal Segmentation fault (11) [Wed Jul 01 00:55:32 2009] [notice] caught SIGTERM, shutting down [Wed Jul 01 00:55:43 2009] [notice] Digest: generating secret for digest authentication ... [Wed Jul 01 00:55:43 2009] [notice] Digest: done [Wed Jul 01 00:55:43 2009] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations *** glibc detected *** /usr/sbin/httpd: double free or corruption (out): 0x2ab491c70cf0 *** ... ... >From the command prompt when i ran the following i got the following error as the root cause: # php --info . . curl CURL support => enabled CURL Information => libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 date *** glibc detected *** php: munmap_chunk(): invalid pointer: 0x2b605055cc00 *** === Backtrace: = /lib64/libc.so.6(cfree+0x1b6)[0x3bd2675a36] php(timelib_builtin_db+0x283)[0x46f5d3] php(zm_info_date+0xa3)[0x456b23] php[0x4f3614] php(zend_hash_apply_with_argument+0x3f)[0x58360f] php(php_print_info+0xa04)[0x4f4a04] php(main+0x400)[0x5f26d0] /lib64/libc.so.6(__libc_start_main+0xf4)[0x3bd261d974] php[0x437bc9] === Memory map: 0040-00684000 r-xp 08:01 2021503 /usr/bin/php 00883000-008a6000 rw-p 00283000 08:01 2021503 /usr/bin/php 008a6000-008b3000 rw-p 008a6000 00:00 0 00aa5000-00ab8000 rw-p 002a5000 08:01 2021503 /usr/bin/php 0e082000-0e1ed000 rw-p 0e082000 00:00 0 [heap] 3bd220-3bd221c000 r-xp 08:01 2512616 /lib64/ld-2.5.so 3bd241b000-3bd241c000 r--p 0001b000 08:01 2512616 /lib64/ld-2.5.so 3bd241c000-3bd241d000 rw-p 0001c000 08:01 2512616 /lib64/ld-2.5.so 3bd260-3bd274c000 r-xp 08:01 2512617 /lib64/libc-2.5.so 3bd274c000-3bd294c000 ---p 0014c000 08:01 2512617 /lib64/libc-2.5.so 3bd294c000-3bd295 r--p 0014c000 08:01 2512617 /lib64/libc-2.5.so 3bd295-3bd2951000 rw-p 0015 08:01 2512617 /lib64/libc-2.5.so . . Aborted Can someone help me in resolving the above errors. Thanks and Regards, Vivek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sybase Database CONNECTIVITY!
Hi, How can I connect PHP application on Linux to the Sybase database which is lying on the different machine. Please help me. Regards, Vivek
[PHP] PHP file Opening Problem
Hi Folks, Whenever I try to open any PHP page on my browser i.e. IE then it displays Windows message box for saving the file on the disk or opening the code in any editor. I mean PHP file is not executed successfully and I am unable to figure out the problem. Please help me. Thanx in advance. Regards, Vivek
[PHP] Apache does not work with PHP
Dear Folks, I am trying to set up Suse Linux Server with sybase and PHP. While configuring my computer with these software I am getting some problem. Actually, I have done following steps: - first of all I Installed the SuSE 7.0 Linux (then apache is installed by default) - then Sybase-ase-11.0.3.3-2 is installed with sybase-CT - then I stopped the apache server and installed PHP from its tar PHP-4.0.4pl1 using following command tar -xvf php-4.0.4pl1.tar and then configured by using this command ./configure --with-apxs=/usr/sbin/apxs --with-sybase-ct=/opt/sybase till this point apache works but after using Make and Make Install Command, apache does not work I am not getting where I am wrong Please guide me friends. Regards, Vivek
[PHP] Installing PHP with Apache and Sybase on Linux
Hi All, Can somebody tell me how to install PHP with Apache and Sybase on Suse linux. It would be great help for me. Regards, Vivek
Re: [PHP] Installing PHP with Apache and Sybase on Linux
Hi Jason, Thanx for your prompt response. Can you guide me how to install PHP with Apache and Sybase on Linux. Regards, Vivek - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 17, 2002 4:27 PM Subject: Re: [PHP] Installing PHP with Apache and Sybase on Linux > On Friday 17 May 2002 18:44, Vivek Kumar Agrawal wrote: > > Hi All, > > > > Can somebody tell me how to install > > PHP with Apache and Sybase on Suse linux. > > > > It would be great help for me. > > There is a list specifically for php installation issues. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > I'd like to meet the guy who invented beer and see what he's working on now. > */ > > > -- > 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] undefined function: sybase_pconnect()
Hi All, I am getting some error like this: "Fatal error: Call to undefined function: sybase_pconnect() in /home/httpd/php/db_sybase.inc on line 47" Please tell me its solution. Regards, Vivek
[PHP] Undefined function Sybase_affected_rows
Hi All, I am unable to call Sybase_affected_rows() function. As I know this function is defined in Sybase CT libraries. So I have installed Sybase via RPM and then configured php with following command ./configure --with-apxs=/the/path/you/like/to/install/apache/bin/apxs --with-sybase-ct=/opt/sybase and while doing all this I did not get any error. Please help me what should I do. Regards, vivek