[PHP-DB] Input Mathematical symbol in HTML textbox
Hi All, I need help with a tool I am developing for my client. What I want is, how can I type X^2 square or M Cube (M^3) in html text box. Is there any method I can follow. Also it should store in mysql database in same format. If I echo out the same variable it should print the same format. Thank you. -- *Best,* *Gu®uCEO Founder at,www.skynetwebservices.in http://www.myshopads.com*
[PHP-DB] Need Help with 2 MYSQL Table
Hi All, Hope everyone is doing well. I need some help regarding a project. I have a huge list of customers in a ledger in a mysql table (Table A). And in another table I have their names and their ID number (Table B). What I want is when I click on a customer name from Table A, I want php to pull out the data of that particular customer from Table B, and show it in a formatted tabular manner. Please help me with this. -- *Best,* *Gu®uCEO Founder at,www.skynetwebservices.in http://www.myshopads.com*
Re: [PHP-DB] Re: Code Security
Put a redirect code in www folder to your index page. On Feb 13, 2015 10:55 PM, Karl DeSaulniers k...@designdrumm.com wrote: Set up a password or a salt that Mr. Nice has to call you to get and expires on logout. Lol Best, Karl Sent from losPhone On Feb 13, 2015, at 8:47 AM, erosenb...@hygeiabiomedical.com wrote: Ethan, It seems like you're looking for a programmatic solution to a physical security problem. In the end, your most viable solution will likely be to train Mr. Goodguy to remove the key the same way he needs to remember his ATM card after a withdrawal. I've seen programmatic work-arounds to solve similar issues, but they have always ended up being significantly arduous for the end users... Respectfully, Joshua D. Arneson -Original Message-From: Ethan Rosenberg [mailto:erosenb...@hygeiabiomedical.com] Sent: Friday, February 13, 2015 9:12 AMTo: php...@lists.php.netSubject: Re: [PHP-DB] Code Security On 02/13/2015 02:58 AM, Karl DeSaulniers wrote: Prevent THIS from ever happening. On Feb 12, 2015, at 11:03 PM, Ethan Rosenberg wrote: He asks Mr.[naive]Nice if he could look at the computer while it is logged in. Otherwise, I would say an external key that has a salt stored on it that the user has to insert in the computer before the system can be accessed. Like an access key card. Immediate shut down when tampered and/or removed. Just a stab in the dark though. Best, Karl DeSaulniers Design Drumm Karl - Thanks. The key is already plugged in. Mr [Naive] Nice is using the computer, and is logged in. Mr. Ugly just want to look at the computer. Ethan-- Joshua - My apologies for an HTML message. That is all I have at work. How about this - Block access to Ctrl-Alt-Del for Mr. Nice. TIA Ethan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Need help with updating existing mysql records with something else
Hi All, I want to update an existing mysql record with another value after calculating it. Below is the code. ?php $connection = mysql_connect(localhost, root, ) or die(Error connecting to database); mysql_select_db(maha, $connection); $result = mysql_query(SELECT * FROM tax, $connection) or die(error querying database); $i = 0; while($result_ar = mysql_fetch_assoc($result)){ ? tr ?php if($i%2 == 1){ echo class='body2'; }else{echo class='body1';}? td ?php $res=$result_ar['mwool40_totqty']-10; echo $res; ?/td /tr ?php $i+=1; } ? I want to append the $mwool40_totqty value with the calculated one $res. Let say initially the value of $mwool40_totqty is 50. and after calculation its value became 40, then the code should edit/alter/update the value in mysql table with integer 40. Please help me with this. -- *Best, * *Guru™*
[PHP-DB] Eliminate the short search term
Hi All, I have a search engine which is working fine. However let say if a user search for books or book its giving results having book or books as keywords. However when a user types books on computers its searching for whole 3 words like books on computers. I want to eliminate the search terms like on, at, in etc and just search for books and computers. Please help me. -- *Best, * *Guru™*
[PHP-DB] A question about mysql
Hi All, I have a question about php-mysql. Is it possible that I can have 2 different fields in a mysql table, and when a user fill out the form for the first time the input goes to first field and when the second user fill out the form the input goes to 2nd field. For example: Lets say I have 2 fields called $name1 and $name2. Now when 1st user input the data it goes to $name1 and then when the second user input the data it should check if the $name2 is NULL and if yes then the data goes to $name2 otherwise it should again start with $name1. -- *Best, * *Guru™*
[PHP-DB] What is wrong with this code??
Hi All, I have this search code for a library. however I have the same script in 2 different files, one with just search script and another with the pagination. But when I combined it its giving me few errors. I am getting the below errors. *Notice*: Undefined index: start in *C:\wamp\www\search with pagenatation\search.php* on line *12* *Notice*: Undefined variable: x in *C:\wamp\www\search with pagenatation\search.php* on line *41* *Notice*: Undefined variable: construct in *C:\wamp\www\search with pagenatation\search.php* on line *43* *Warning*: mysql_num_rows() expects parameter 1 to be resource, boolean given in *C:\wamp\www\search with pagenatation\search.php* on line *56* No results found. * Here is the search.php code:* ?PHP @mysql_connect(localhost,root,) or die(couldn't connect); @mysql_select_db(search) or die(couldn't select database.); // max displayed per page $per_page = 1; //get data $button = $_GET['submit']; $search = $_GET['search']; $start = $_GET['start']; // count records $record_count = mysql_num_rows(mysql_query(SELECT * FROM search)); //count max pages $max_pages = ceil($record_count / $per_page); // may come out as decimal if (!$start) $start = 0; if ($button=0)//or try ==0 its bean a long time echo codebr You didn't submit a keyword./code; else { if (strlen($search)=2) echo code style='width: 100%;'br Search term too short./code; else { echo codeYou searched for b$search/b/code; //explode our search term $search_exploded = explode( ,$search); foreach($search_exploded as $search_each) { //construct query $x++; if ($x==1) $construct .= keywords LIKE '%$search_each%'; else $construct .= OR keywords LIKE '%$search_each%'; } //echo out construct $construct = SELECT * FROM search WHERE $construct LIMIT $start, $per_page; $run = mysql_query($construct); $foundnum = mysql_num_rows($run); echo $foundnum; if ($foundnum==0) echo codebr No results found./code; else { echo code $foundnum results found!/code; while ($runrows = mysql_fetch_assoc($run)) { //get data $title = $runrows['title']; $desc = $runrows['desc']; $key = $runrows['keywords']; $url = $runrows['url']; echo table class='search-results' tr td p id='headline'Game: a href='$url'$title/a/p p id='descript'$desc/p p id='tags'Tags: $key/p /td /tr /table ; } // setup navagation $prev = $start - $per_page; $next = $start + $per_page; // prev button if(!($start=0)) echo a href='search.php?search=$searchstart=$prev'Prev/a ; // show page numbers //set variable for first page $i=1; for ($x=0;$x$max_pages;$x=$x+$per_page) { if ($start!=$x) echo a href='search.php?search=$searchstart=$x'$i/a ; else echo a href='search.php?search=$searchstart=$x'b$i/b/a ; $i++; } /*for ($x=0;$x$record_count;$x=$x+$per_page) { if ($start!=$x) echo a href='search.php?search=$searchstart=$x'$i/a ; else echo a href='search.php?search=$searchstart=$x'b$i/b/a ; $i++; } */ // next button if(!($start=$record_count-$per_page)) echo a href='search.php?search=$searchstart=$next'Next/a ; } } } ? -- *Best, * *Guru™*
[PHP-DB] Need Help with Search Engine
Hi All, I coded a search engine which is pretty good on its own terms. I have functions and conditions for blank entries or any SQL injection. However I have a problem. When a user start search he uses words like in, for, the, at, on etc... For example: Hotels in India or Car for rent etc.. How will I ignore these words and take just the main words? Please help me. -- *Best, * *Guru™*
Re: [PHP-DB] radio form submission
I guess if you are storing the value of post_tptest in the database, it should return the same value what the user selected in the radio option. If I am right in your display you are just calling the data from the database. Check if the data is properly storing the radio button values in the database ?? -- *Best, * *Guru™*
Re: [PHP-DB] Converting from PHP4 to php5
Richard I are waiting for an answer from someone..??? -- *Best, * *Guru™*
Re: [PHP-DB] Converting from PHP4 to php5
I am not a master but as per my knowledge your software which is in PHP4 should work properly in PHP5 too. -- *Best, * *Guru™*
[PHP-DB] Need Help with PHP Mails
Hi All, I have this HTML form style type=text/css !-- .style14 {font-size: 24px } .style14 {font-size: 12px} -- /style table width=788 border=0 align=center tr td width=1023form method=post action= table width=648 height=133 border=0 align=center cellpadding=0 cellspacing=0 bordercolor=#00 tr td width=132 height=44 valign=middlediv align=rightstrongYour Name/strong/div/td td width=491 valign=middleinput name=party_name type=text size=50 //td /tr tr td valign=middlediv align=rightstrongContact Numbers/strong/div/td td height=38 valign=middlep align=left input name=contact_nos type=text size=50 / span class=style14(please specify STD code)/span/p/td /tr tr td valign=middlediv align=rightstrongEmail/strongstrong /strong/div/td td height=33 valign=middleinput name=email type=text size=50 //td /tr /table p align=center input type=submit value=submit name=submit /p /form/td /tr /table What I want is when the user click on the submit button the data from this form should directly comes to my email. I tried mail function but not working for me. I just need these 3 fields in my mail. Please help me with this. -- *Best, * *Guru™*
[PHP-DB] Re: [PHP-WIN] Need Help with PHP Mails
Hi Richard, I am using simple PHP mail function but, I am unable to send an email to myself. What I want is when the user click on submit button I should get an email with the form data. 2011/4/4 Richard Quadling rquadl...@gmail.com 2011/4/4 Guru™ nagendra802...@gmail.com: Hi All, I have this HTML form style type=text/css !-- .style14 {font-size: 24px } .style14 {font-size: 12px} -- /style table width=788 border=0 align=center tr td width=1023form method=post action= table width=648 height=133 border=0 align=center cellpadding=0 cellspacing=0 bordercolor=#00 tr td width=132 height=44 valign=middlediv align=rightstrongYour Name/strong/div/td td width=491 valign=middleinput name=party_name type=text size=50 //td /tr tr td valign=middlediv align=rightstrongContact Numbers/strong/div/td td height=38 valign=middlep align=left input name=contact_nos type=text size=50 / span class=style14(please specify STD code)/span/p/td /tr tr td valign=middlediv align=rightstrongEmail/strongstrong /strong/div/td td height=33 valign=middleinput name=email type=text size=50 //td /tr /table p align=center input type=submit value=submit name=submit /p /form/td /tr /table What I want is when the user click on the submit button the data from this form should directly comes to my email. I tried mail function but not working for me. I just need these 3 fields in my mail. Please help me with this. -- *Best, * *Guru™* As this is a PHP for Windows mailing list, I assume you actually are having a problem with PHP on Windows? And not your HTML code. As you are in a PHP for Windows mailing list, I assume you are on Windows, which, as you are now experiencing, doesn't have a mail server built in, nor an app you can run that provides the same facility. See http://uk.php.net/manual/en/book.mail.php for all the lovely documentation, especially with the runtime configuration options. Most likely, you've not set these appropriately. But, in short, you are going to need to tell us what is NOT working for any realistic help. Personally, I use HTMLMimeMail5 (now called RMail) from phpguru.com. PHPMailer is another tool that does a similar job. It may be better, I've just never used it. Regards, Richard. P.S. Guru? Really? -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- *Best, * *Guru™*
[PHP-DB] Re: [PHP-WIN] Need Help with PHP Mails
Hi, Here is the PHP script I am using to send email to myself. ?php $party_name = $HTTP_POST_VARS['party_name']; $contact_no = $HTTP_POST_VARS['contact_no']; $email = 'nagendra802...@gmail.com'; mail($email,$party_name,$contact_no); ? 2011/4/4 Richard Quadling rquadl...@gmail.com 2011/4/4 Guru™ nagendra802...@gmail.com: Hi Richard, I am using simple PHP mail function but, I am unable to send an email to myself. What I want is when the user click on submit button I should get an email with the form data. 2011/4/4 Richard Quadling rquadl...@gmail.com 2011/4/4 Guru™ nagendra802...@gmail.com: Hi All, I have this HTML form style type=text/css !-- .style14 {font-size: 24px } .style14 {font-size: 12px} -- /style table width=788 border=0 align=center tr td width=1023form method=post action= table width=648 height=133 border=0 align=center cellpadding=0 cellspacing=0 bordercolor=#00 tr td width=132 height=44 valign=middlediv align=rightstrongYour Name/strong/div/td td width=491 valign=middleinput name=party_name type=text size=50 //td /tr tr td valign=middlediv align=rightstrongContact Numbers/strong/div/td td height=38 valign=middlep align=left input name=contact_nos type=text size=50 / span class=style14(please specify STD code)/span/p/td /tr tr td valign=middlediv align=rightstrongEmail/strongstrong /strong/div/td td height=33 valign=middleinput name=email type=text size=50 //td /tr /table p align=center input type=submit value=submit name=submit /p /form/td /tr /table What I want is when the user click on the submit button the data from this form should directly comes to my email. I tried mail function but not working for me. I just need these 3 fields in my mail. Please help me with this. -- *Best, * *Guru™* As this is a PHP for Windows mailing list, I assume you actually are having a problem with PHP on Windows? And not your HTML code. As you are in a PHP for Windows mailing list, I assume you are on Windows, which, as you are now experiencing, doesn't have a mail server built in, nor an app you can run that provides the same facility. See http://uk.php.net/manual/en/book.mail.php for all the lovely documentation, especially with the runtime configuration options. Most likely, you've not set these appropriately. But, in short, you are going to need to tell us what is NOT working for any realistic help. Personally, I use HTMLMimeMail5 (now called RMail) from phpguru.com. PHPMailer is another tool that does a similar job. It may be better, I've just never used it. Regards, Richard. P.S. Guru? Really? -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- Best, Guru™ So, just like I said, you haven't setup PHP's mail configuration options and/or you don't have a local SMTP server. Without these being correct, you won't get any email. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- *Best, * *Guru™*
Re: [PHP-DB] Need Help with PHP Mails
Hi Will, Below is my final PHP code, and its working now. However this is just a small piece of the form that I have created. In my original form I have more then 50 fields and variables. Now I am not sure how to expand this code having all 50 fields. Can the mail function will take that much fields? ?php if(isset($_POST['submit'])) // submit button clicked { $party_name = isset($_POST['party_name'])? $_POST['party_name']:null; $contact_no = isset($_POST['contact_no'])? $_POST['contact_no']:null; $pemail = isset($_POST['pemail'])? $_POST['pemail']:null; $mymail = nagendra802...@gmail.com; if(mail($mymail, New contact info submitted!,Party: {$party_name} Contact: {$contact_no}Email: {$pemail})) { echo 'Mail sent!br /'; } } ?