- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
64 Posted Topics
Hi.. Check out this tutorial... this will help you... [url]http://www.htmlgoodies.com/beyond/webmaster/article.php/3548746[/url] When you specify the location to store the images, then its mostly the hard path, for eg. c:\inetputb\wwwroot\mysitename\images... or /var/home/sitename/images So take care of the paths...
Hi... What i suggest you is to create a category select box and its value should be the same as of your tablename.... (this is what you have done.. table for every category) I hope too many php tags doesn't confuses you... Its just to display result in a better …
[QUOTE=rohan_shenoy;755304]I know this thread is old, but I feel it deserves this bump as I have the solution, which has not been given previously in this thread. Moreover this thread ranks well in search search, so I think the solution will benefit. No need of any javascript hassles, instead use …
On the top of the page, just include the following piece of code... [code=php] <?php if($_POST['delete']=="Delete") { $delete_ids=implode(",",$_POST['checkbox']); mysql_query("Delete from $tbl_name WHERE id in $delete_ids"); //Checkbox is the input field named checkbox.. It automatically takes goes as an array in php. //Thats it.. you are done..... } [/code]
Thats good you solved it. But this $row is an array. So making it 0 is a bit strange. What other thing you can do is, you can declare it as an empty array: [code=php] $row = array(); $row = mysql_fetch_array(); // Proceed with rest of the code [/code]
Hi... Thanks for the valuable information.. You can also put this information in the form of code snippets in the code snippets section... May be remember me kind of code in login sections.. Great job.. keep it up..
Use escape character which is a backslash (\) [code=php] <HTML> <BODY> <a href="delete.php" OnClick="return confirm('blah blah');"> Click here </a> <?PHP ECHO "<a href=\"delete.php\" OnClick=\"return confirm('blah blah');\"> Click here </a>"; ?> </BODY> </HTML> [/code]
Hi I really doubt whether this piece of code will work for every date.. It might not work with february date, leap years, and for months with months with 30 days like april.. Im providing you with some other code sample, that can work for most of the cases... [code] …
Hi.. Im also new to this concept... But i think i can try... All this can be done in the .htaccess file in the root folder of your website... You can search on mod_rewrite or rewriterule on google to get more tutorials and details... [code] RewriteEngine On RewriteRule ^/products/(.*).html$ /products\.php?category_name=$1 …
You can use a couple of things with this. Read about URL Rewriting (a bit advanced thing, but you can try). Or search on this forum, you will get somethng about URL Rewriting using .htaccess. Other option, where only index page shows, you can put your pages dynamic. For eg: …
Hi, I have a requirement where i have a windows server with IIS and PHP 5. My PHP script creates a file and windows OS is not allowing me to create a file using fopen function. It gives Permission Denied error. Can anyone give an idea where i can internally …
Hi, First of all before you read a text file (survey.txt), you need to define a particular way your file has the contents. For eg: if you have your survey questions and options, then your file may have a format as given below: What is an average age? 1. 17-20 …
Hi, You can use XAMPP.. No issues.. But yes you need to setup and install MSSQL Server separately. Make sure yyou create a tble in MS SQL and then run queries in MS SQL. XAMPP contains an extension for MSSQL and usually its enabled by default. You can check php.ini …
You can also try to limit the content of the description. eg: [code=php] <td><?php echo substr(0,100,$desc)."..."; [/code] This will show only first 100 characters of the description.
something like this would be helpful: [code=php] switch($var) { case 1: include("1.php"); break; case 2: include("2.php"); break; case 3: include("3.php"); break; } [/code]
[code=php] <?php if($_POST['submit'] == "Send Email") { $sql = "Select * from tablename where id=".$_POST['id']; $res = mysql_query($sql); $data = mysql_fetch_array($res); $to_email = $data['email']; //Send mail here // mail($to_email,$subject,$msg); } ?> <form name="frmEmail" action="" method="post"> <input type="text" name="id" id="id" /> <input type="submit" name="submit" id="submit" value="Send Email" /> </form> [/code]
Hi... Ok, i got your problem. Since you would have put action in your form tag as register.php, so this is bound to go to the register.php page. Instead you can do one thing: Set the results/error messages in the SESSIONS variable. Now call index.html page and on body onload …
Hi, I hope you know how to send a mail to a user in php. If you know this, then the below code can help you. Basic idea: Show a checkbox in front of every email id. Select and click a submit button to send emails to the selected email …
Please be more specific. Any particular requirement of yours...
First check if the mysql service is there in the wamp.... In wamp, put ur mouse cursor on the wamp icon on system tray, it should show alll services running.... try to individually start the mysql service if not started.. access the phpmyadmin to access the databases... [url]http://localhost/phpmyadmin[/url] from php …
Hi. Yes this thing works... Infact, the most famous payment gateway PAYPAL works on this principle... If you want to make your transaction more secure, use CURL. Using this, you can get your data processed from other server. Otherwise, this simple POST also works good.
Once you post the data, insert it into the mysql database, use the mail function to send the confirmation through the email. Usually mail function does not work on local systems as no mail exchange service is installed like SMTP. So u need to test it on a real-time hosting …
Usually you cannot change the ini file settings on the servers. But If you want to change the upload_max_filesize, better use the ini_set function. Using this function you can set the php.ini files values. e.g. [code=php] ini_set("upload_max_filesize",1024768); [/code] The above will set the upload filesize for your website to 1 …
Hi, Try to debug your code as why the email is not going... As far as mail function is concerned, it return true if mail is sent and returns false if mail is not sent. So just use [code=php] echo $sendmail [/code] And see what value is coming and then …
Hi, I agree with Chris... Use echo $sql_query to display if the query is working... If you are still unsure, try to use it through phpmyadmin and echo the query with values... Secondly, when you run mysql_query, use or die with it.. E.g.: [code=php] mysql_query($sql) or die("Query failed: ".mysql_error()); [/code] …
Hi All, I have a PHP Application and a folder in that say, online_training. Now i want this online_training to be secured.. It contains some pdf and swf files... I am using databases and PHP Sessions for user validation but i can still directly access my pdf files without logging …
Hii... Use the following function to copy the data from one table to the archived table.. When someone deletes the current record, you must be having its ID... So you can use its ID in the query string.. So once someone deletes this record.. you can write the following code …
Hi.... There are two problems mainly... Firstly.. When you use a textarea for text purpose, it does not take the enter (line break) automatically... For this purpose, when you post the information, in the php code, when you use $_POST... just add a small function in there.. [code=php] <?php $desc_field …
Hi... What you are asking is not clear... Let me try.. you want to display the thread title and not the comment title in the query.... If this is the case.. then join the table threads also and join it on comment.thread_id = threads.thread_id I hope you are having threads …
Hi.. In validating phone you missed out one bracket { in the if condition [code=php] // validate phone if (is_numeric($phone) == FALSE [COLOR="Red"])[/COLOR] { $error = "Please enter a valid contact number (must contain numbers only)<br/>"; } [/code]
Hi.. Not much difference... The code behind both can remain same... Just the extension is different... What initially it started was that inc was used to include the files in plain html.. Html also has a command to include the files... So people used to name that file filename.inc But …
Assuming that the two tables that you have are exactly the same in their structure.. i mean, both have same fields and same order of fields.. Then you can execute first query, then second query, and append the data of second query to the first one.. See the example below... …
Hi Amy, I think its better to store it in a temporary folder.. not the php temp folder, but the one you create.... 1) Instead of saving it directly to the database, first store it in some location, say temp_upload_folder (custom folder you created).. 2)Store the files location & name …
Hi.. How are you trying to change the database...?? Seems you just getting out the data from the database.. And secondly... in the if condition... this condition is getting finished at echo $row; Check your code.. echo $row should be before if statement..
Since you have posted on MySQL Community, then it seems you are using MySQL.. Yes mysql demands its queries to be ended with a semicolon... Bt this mostly happens when you use the command line interface.... I dont think this should be an issue when you run a query on …
Please be more clear in your requirement.. In first point... multi-select checkbox?? are u trying to say multiple select box...??
Hi... Why are you giving two controls the same name.. One is checkbox and other hidden field... Just put one control... Use checkbox and give it name as chk[] ... Yes you read right.. Its an array.. Secondly.. give its value as user's id or name (basically the field from …
Perhaps you can use some other token like the phpsessid from the php sessions to make your links more secured.. for eg. [url]http://mysite.com/yourpages.php?phpsessid=Aw2jdj3ddk39[/url] You can generate this phpsessid on the very first page of your site... i.e. your index.php page... and then use it on every page.. On the top …
Hi... inorder to record the sessions, do the following: login.php [code=php] <?php session_start(); //most important line... as it marks the start of session //suppose user submits the login button and redirects to this page if($_POST['submit']=="submit") { //some condition above in if to detect user actually pressed login button //connect to …
Hi... I recently came across this UI testing tool... [COLOR="Green"]SELENIUM[/COLOR]... Its really a great toool... and you can have a look on how it works... It works as a plugin to mozilla... Automates your UI Testing... Its an amazing tool... You can use to test your newly build site... Try …
Hi... Its pretty simple... You should have read install.php carefully.. Anyways.. 1) In the drupal folder, there is a site folder and in there you have a default folder.. Just rename the drupal/sites/default/default.settings.php file to -> /drupal/sites/default/settings.php 2) Edit the above settings.php file and edit the database url variable $db_url …
Hi.. Preferably try to make each and every of such pages secure by using ssl.. i.e. https... with this it will not save the form data... and everytime request a new data...
Hii... post your complete code.. also your main html code in here.... coz it will give us more clear idea about how the thing is working...
Hi... Try this.... [code=php] <?php // Define variables $result1 = mysql_query("SELECT log_filename FROM uploads_log"); $filename = mysql_fetch_array($result1); $result2 = mysql_query("SELECT log_issue FROM uploads_log"); $issueno = mysql_fetch_array($result2); $result3 = mysql_query("SELECT log_month FROM uploads_log"); $issuemonth = mysql_fetch_array($result3); print "<a href='www.url/uploads/".$filename."'>Issue ".$issueno.", ".$issuemonth."</a>"; ?> [/code]
Hi please provide more details for the add category thing.. What help can we provide you...
Hi.. Does any one have any idea how to refer our webpages without their extensions... Im not typically asking like http://abc.com/pagename Im basically asking about the blog sites, sites having archived newsletter... They have a url like http://abc.com/archives/2008/10/2/building-websites-with-html And the page opens with the same title as url but without …
Hiiii..... You can use the limit option that is available in SQL queries to limit the amount of data returned from the website.... For eg: [code=sql] Select * from mytable where category='computers' order by name asc limit 0,20 [/code] The above SQL query will show 20 records beginning from 1st …
Hi... Why are u comparing this value with 50.... preg_match returns true of false... If you are comparing with the strlength, then use different if for comparing the string length.. use the following if condition.. this will run... [code=php] if( !empty($_POST['email']) && preg_match('/^[\w.-]+@[\w.-]+\.[A-Za-z]{2,6}$/', $_POST['email']) ) [/code]
Hi.. This is PHP community.. so in relation to php, your mail server is mostly setup by your website hosting company.. so contacting them is a better idea... Otherwise you can use the PEAR mail package to configure the php mail for different smtp.... Check out this link.. [url]http://pear.php.net/package/Mail[/url]
Hi... I think its better to use javascript for the validation.. There are mainly 2 reasons for this purpose... 1) Using javascript it looks more professional.. You tell the user on the client side itself without submitting the form.. 2) Once the form is submitted, then to validate, you also …
The End.
sikka_varun