[PHP] Data trasfer between PHP pages
Hi, I have one form where user fills data using radio buttons. Only one answer goes from here to another page. FORM 1 5 1 3 --- FORM 2 There is another page has a form with 14 fields PLUS I need the data of the previous form to be hidden somewhere in this form. Once this form is submitted I need to put the combined data into the database. I know this is so simple. But not sure why this is not working. I tried to use from the first form but its not working. My module page has to go live tomorrow morning, I am stuck, please help. Thanks, Chris -- View this message in context: http://www.nabble.com/Data-trasfer-between-PHP-pages-tp21418587p21418587.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] To check for existing user in database
Hi, I know this is very basic question, this is so because I am a basic programmer struggling to make things work. Where in this code should I be trying to check if the user already exists and throw an error saying "The user already exists ding ding ding". The check has to be done with the emailAddress: Thanks in advance, Chris -- View this message in context: http://www.nabble.com/To-check-for-existing-user-in-database-tp21483013p21483013.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sometime the code works and sometimes doesn't
Hi, Here is a code for PHP password sending. There is some strange thing happening. This code DOES WORK but not always. So I might be able to get the password in my mailbox once but not always. What could be wrong. "; $messages= "Hi \n\n Your password for login to our website is retrieved.\n\n"; $messages.="Your password is '$your_password' \n\n"; $messages.="You can use this password"; // send email $sentmail = mail($emailAddress, $subject, $messages, $header); } // else if $count not equal 1 else { echo "Not found your email in our database"; } // if your email succesfully sent if($sentmail){ echo "Your Password Has Been Sent To Your Email Address."; } else { echo "Cannot send password to your e-mail address"; } ?> There must be something that I am doing wrong. Otherwise I could have always gotten the password in my mailbox. Please help. Thanks in advance, Chris -- View this message in context: http://www.nabble.com/Sometime-the-code-works-and-sometimes-doesn%27t-tp21502951p21502951.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Code Not entering the value in the Database
Hi, My code is not giving error but not doing the desired action. I need to append a value in database just when the user logs in after entering the username and password. So I am not presenting the user with a account but just a thank you page. Steps: 1) User enters the user name and password 2) The login form contains a hidden field with a data 3) After hitting the Submit button the username and password is checked. 4) The hidden data is entered in the database. 5) A mail is sent to the user and he gets a Thank You page. 6) If verification fails then he gets a registeration page. Here is the code, I have been struggling with: What exactly am I missing. Thanks in advance, Chris -- View this message in context: http://www.nabble.com/Code-Not-entering-the-value-in-the-Database-tp21564252p21564252.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] What if this code is right ? It worked perfectly for years!!
Hi, The code below actually takes input from a web form and sends the fields captured in an email. It used to work quite well since past few years. It has stopped now. I used Google's mail servers (google.com/a/website.com) http://www.thankyou.com/thankYouContact.php"; ); ?> This is the simplest one, how could it simply stop? Any help would be appreciated, I have already lost 148 queries that came through this form. Thanks in advance, Chris -- View this message in context: http://www.nabble.com/What-if-this-code-is-right---It-worked-perfectly-for-years%21%21-tp25118874p25118874.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What if this code is right ? It worked perfectly for years!!
Is there any alternative method to do this !!! Sending email through PHP? Paul M Foster wrote: > > On Mon, Aug 24, 2009 at 09:12:19AM -0700, Chris Carter wrote: > >> >> Hi, >> >> The code below actually takes input from a web form and sends the fields >> captured in an email. It used to work quite well since past few years. It >> has stopped now. I used Google's mail servers (google.com/a/website.com) >> >> > $fName = $_REQUEST['fName'] ; >> $emailid = $_REQUEST['emailid'] ; >> $number = $_REQUEST['number'] ; >> $message = $_REQUEST['message'] ; >> >> mail( "ch...@gmail.com", $number, $message, "From: $emailid" ); >> header( "Location: http://www.thankyou.com/thankYouContact.php"; ); >> ?> >> >> This is the simplest one, how could it simply stop? Any help would be >> appreciated, I have already lost 148 queries that came through this form. > > As a test, change $_REQUEST above to $_POST (assuming POST method on the > form), and try it. > > Also check the return value of the mail() function to see if it thinks > it has succeeded or failed. If it fails, check the mail logs on the > server to find what the mail server thinks is wrong. > > Paul > > -- > Paul M. Foster > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- View this message in context: http://www.nabble.com/What-if-this-code-is-right---It-worked-perfectly-for-years%21%21-tp25118874p25120282.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include file error, common one I think
Hi, I have used this file in my index file. When I run this file separately it shows the random image but not when I include on my index.php. Thanks in advance, João Cândido de Souza Neto wrote: > > Is it the whole code of your file, or is there any other html code? > > "Chris Carter" <[EMAIL PROTECTED]> escreveu na mensagem > news:[EMAIL PROTECTED] >> >> Hi, >> >> Here is code that I got from the internet for random image. This file >> works >> perfect if I try it independently but not on any existing file. I think >> the >> error that I am getting is quite common on the net but its new for me. >> >> I am getting this error: >> >> Warning: Cannot modify header information - headers already sent by >> (output >> started at /folder/test.php:12) in /folder/randomimage.php on line 19 >> >> the code that I got from net: >> >> > $folder = 'images/'; >> $exts = 'jpg jpeg png gif'; >> $files = array(); $i = -1; >> if ('' == $folder) $folder = './'; >> $handle = opendir($folder); >> $exts = explode(' ', $exts); >> while (false !== ($file = readdir($handle))) { >>foreach($exts as $ext) { >>if (preg_match('/\.'.$ext.'$/i', $file, $test)) { >>$files[] = $file; >>++$i; >>} >>} >>} >> closedir($handle); >> mt_srand((double)microtime()*100); >> $rand = mt_rand(0, $i); >> >> >> Line 19 is below: >> >> header('Location: '.$folder.$files[$rand]); >> ?> >> >> Thanks a bunch. >> Chris >> -- >> View this message in context: >> http://www.nabble.com/Include-file-error%2C-common-one-I-think-tf2971907.html#a8316202 >> Sent from the PHP - General mailing list archive at Nabble.com. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- View this message in context: http://www.nabble.com/Include-file-error%2C-common-one-I-think-tf2971907.html#a8316921 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Include file error, common one I think
I am not sure about this but the requirement is that even the links associated with the image changes with the image. Like an image of restaurant links to restaurants page and image for pubs links to pubs page. Is this achievable through this code. I could not test it coz it was not working. Can you help!!! Thanks, Jochem Maas wrote: > > Chris Carter wrote: >> Hi, >> >> I have used this file in my index file. When I run this file separately >> it >> shows the random image but not when I include on my index.php. > > your image script shouldn't be included in your [index] page. > instead it should be referenced by the src attribute of an img > tag that your [index] page outputs e.g. in your [index] page > have a line something like: > > echo ' /randomimage.php '; > >> >> Thanks in advance, >> >> >> João Cândido de Souza Neto wrote: >>> Is it the whole code of your file, or is there any other html code? >>> >>> "Chris Carter" <[EMAIL PROTECTED]> escreveu na mensagem >>> news:[EMAIL PROTECTED] >>>> Hi, >>>> >>>> Here is code that I got from the internet for random image. This file >>>> works >>>> perfect if I try it independently but not on any existing file. I think >>>> the >>>> error that I am getting is quite common on the net but its new for me. >>>> >>>> I am getting this error: >>>> >>>> Warning: Cannot modify header information - headers already sent by >>>> (output >>>> started at /folder/test.php:12) in /folder/randomimage.php on line 19 >>>> >>>> the code that I got from net: >>>> >>>> >>> $folder = 'images/'; >>>> $exts = 'jpg jpeg png gif'; >>>> $files = array(); $i = -1; >>>> if ('' == $folder) $folder = './'; >>>> $handle = opendir($folder); >>>> $exts = explode(' ', $exts); >>>> while (false !== ($file = readdir($handle))) { >>>>foreach($exts as $ext) { >>>>if (preg_match('/\.'.$ext.'$/i', $file, $test)) { >>>>$files[] = $file; >>>>++$i; >>>>} >>>>} >>>>} >>>> closedir($handle); >>>> mt_srand((double)microtime()*100); >>>> $rand = mt_rand(0, $i); >>>> >>>> >>>> Line 19 is below: >>>> >>>> header('Location: '.$folder.$files[$rand]); >>>> ?> >>>> >>>> Thanks a bunch. >>>> Chris >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Include-file-error%2C-common-one-I-think-tf2971907.html#a8316202 >>>> Sent from the PHP - General mailing list archive at Nabble.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 > > > -- View this message in context: http://www.nabble.com/Include-file-error%2C-common-one-I-think-tf2971907.html#a8331510 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Pop up window in PHP code
I am trying to open a Java script pop up widow from within the php code. Not able to get it done, the error I think is in the use of "" '' .. I mean double and/or single quote. Do not know how to place those. Please advice. The code is below: echo " $shopname $category $subcategory $level javascript:poptastic( Details "; $i++; The Javascript code is: var newwindow; function poptastic(url) { newwindow=window.open(url,'name','height=490,width=900,left=150,top=175'); if (window.focus) {newwindow.focus()} } The javascript code works perfect with other pages and within HTML, its just that the PHP is not supporting the quotes and double quotes. I have even tried &rsquo &rdquo and all. Thanks in advance -- View this message in context: http://www.nabble.com/Pop-up-window-in-PHP-code-tf3167481.html#a8786668 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Open pop-up stylish window
Hi, I am looking for a way to open a preview window. This should be a seperate pop-up but within the same page. The moment the user clicks for say "more details »" .. this should not open a next page or a pop-up window but a dhtml transparent window that has the short discription. This window might display onclick just below the "more details »" link. Has anyone come across this ever. Please assist with a link or with your advice. Sorry about posting on PHP-General though its HTML thing. Thanks, -- View this message in context: http://www.nabble.com/Open-pop-up-stylish-window-tf3181638.html#a8829459 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Any Internal search engine in PHP?
Hi, I had been trying some search engines for internal searches within my website. I tried google co-op which failed as the results were showing on supplemental index. The one provided by cpanel does not show more than 2-3 URLs in results. Please advice if you know about any php based search engine that can index my pages internally. Certainly an open source one. Thanks, Chris -- View this message in context: http://www.nabble.com/Any-Internal-search-engine-in-PHP--tf3205175.html#a8900320 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Banner rotation with links
How can I rotate a banner as well as the link in it within a page using PHP. This can be done as a include file php. Anybody please supply some code or a link for this. Thanks in advance. Chris -- View this message in context: http://www.nabble.com/Banner-rotation-with-links-tf3228157.html#a8968148 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] needed Yahoo like window for db query.
Need some help on getting some database result in a css popup like yahoo. The requirement is to open a div or a window similar to yahoo one. As you can see from the link below. http://news.yahoo.com/s/ap/20070218/ap_on_go_co/us_iraq On this if you click on the Images next to the links "Iraq", "President Bush", "Hillary Rodham Clinton", "Pentagon", etc. This opens a div within the page with the search result. They are using some JavaScript to achieve this. Is there anyone with idea of where to find a code for a similar kind of window. I need to present data from database in a similar kind or window. Any link, text to search in google or code would do :-| Thanks in advance, Chris -- View this message in context: http://www.nabble.com/needed-Yahoo-like-window-for-db-query.-tf3247592.html#a9027932 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Dynamic data in CSS Pop Up got but just one.
Thats great! I would try that as a solution. However, I am not sure if everytime a seperate div would open at the location of the row. For example, if I have data in the first row that row gets hyperlinked and the Div can be opened on the first row. After the first row at least 20 rows are grayed out coz there is not data. Now, when I click on the 21st row for the data, it opens up the first row only and not at the location of 21st row. Thats one thing I am facing right now. Thanks again. Jochem Maas wrote: > > Chris Carter wrote: >> Hi, >> >> I am trying to create a dynamic table. Which is working fine. On the >> onclick >> event of one of the hyperlink in a field (called Details) a small css pop >> up >> opens. THis works fine when I have just one row. But in case I have more >> than one rows the Details link comes Hyperlinked but when I click on the >> link it opens the css pop up at just one location. You can try this here. >> >> > > ... > >> > onclick="javascript:toggleLayer('commentForm');" />> id="commentForm" >Beti > > the 'id' attribute must be unique within your page - that is part of the > (x)HTML spec ... which provides you with a clue. > >> javascript:toggleLayer('commentForm'); >> Add a comment >> >> > onclick="javascript:toggleLayer('commentForm');" /> >> >> >> How to open separate window for separate rows with the data specific to >> that >> row only. I am using the Id in php to retrieve the data. > > I have no idea what 'Id' is exactly but it's another clue to your > solution: > > echo ''; // etc > // etc > echo "onclick=\"javascript:toggleLayer('commentForm",$Id,"');\""; // etc > > the value of $Id must change for every row of data you are outputting. >> >> Thanks in advance. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- View this message in context: http://www.nabble.com/PHP-Dynamic-data-in-CSS-Pop-Up-got-but-just-one.-tf3265410.html#a9077374 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to call image from mySql to php file
I have a field in database called "logos" which has one value "images/logos/some_logo.jpg" In my php I am trying to call it in my php file as image. With this code. $sno = $_REQUEST['sno']; $query="SELECT logos FROM table WHERE sno = '$sno'"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); $logos=mysql_result($result,$i,"logos"); echo " $logos "; ?> But getting errors. What is the way to call image in php file from the database. I know that this is a very basic question but first time for me. I ignored this in the begining but now its right infront of me. Please advice. -- View this message in context: http://www.nabble.com/How-to-call-image-from-mySql-to-php-file-tf3267012.html#a9081704 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Any automated php email sending solution please?
Any software that anyone is aware of for sending automated emails. I have some email addresses in my database, now I am looking forward to send HTML Formatted emails to those email address without having to pick up each email address and send it. I am using php on my site and cPanel is where I am doing all this from. Thanks in advance, Chris -- View this message in context: http://www.nabble.com/Any-automated-php-email-sending-solution-please--tf3369137.html#a9374216 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Session variable
Hi, I have retrieved 4 values from database. Out of which 3 are displayed on the same page and one variable, which is email address, needs to be carried to the next page through a hyper link, the next page is actually a web form. I can do this by either transferring that variable through query string or through session. Now the next page which is a web form is connected to a file that sends email using php email functionality. The problem I am having is just sending this $email variable from page one to the web form. Once it reaches the web form, I need to again pass it to the file that has php email functionality. How to send the variable across these pages. I tried: On Page 1: On the webform: on the php email page it's like this: Please advice a work around for this if I am doing it wrong. I know I am. Chris -- View this message in context: http://www.nabble.com/PHP-Session-variable-tf3473378.html#a9693267 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php Login script issue
Hi, Its just a login and password validation that I am trying to achieve. If the username is correct then the person is able to view certain page, if incorrect then he is directed elsewhere. Successfully,Logged in logout.php Log OUT welcome.php Click here if your browser is not redirecting automatically or you don't want to wait. "; print ""; print " self.location='submit-store-details.php';"; // Comment this line if you don't want to redirect print ""; } } else { session_unset(); echo "Wrong Login. Use your correct Userid and Password and Try "; } ?> I am getting this error when I am using this code: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in thispage.php on line 37 Wrong Login. Use your correct Userid and Password and Try Why does it show up everytime and whats wrong with mysql_fetch_array(). Please advice also if there is some other way available please help me try that. Thanks, Chris -- View this message in context: http://www.nabble.com/php-Login-script-issue-tf4450691.html#a12698139 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Rating system
Hi, I am trying for a php rating code that can utilized for a restaurant requirement. First of all I am not sure if there is database that is obvious with rating system. In case it is or even if its not, is there some site and code available from where the code can be used. I have tried some but most of them do not work. Please advice, Chris. -- View this message in context: http://www.nabble.com/PHP-Rating-system-tf4166430.html#a11853841 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php