39,323 Topics
| |
I have a news website in PHP & MySQL. All News items are generated from the database with a php file (../shownews.php?newsid=39393). Here my problem is that i want to put MOST POPULAR NEWS ITEM and i can't figure out how to do so as its dynamically generated. Someone please … | |
[COLOR="Red"]Here is an extract of coding from my "main.php"[/COLOR] [CODE=php] if ($_GET["action"]==1){ //Redirected from the login page } else if ($_GET["action"]==2){ //Redirected from other page } else if ($_GET["action"]==3){ //Redirected from other page } else if ($_GET["action"]==4){ print "Test"; } else if ($_GET["action"]==5){ print "Test2"; } [/CODE] [CODE] <a href … | |
Hello, l want to retrieve information from a database,, l have a section for it to load but there is two entries (for now) l want it to pick a random one and load it, how can l do this? in my html file l have Name: <?php echo $latest_deal_name; … | |
My site is a kid-based gaming site. I don't want users to be able to enter bad words. I don't want a filter that censors them, but one that if a bad word is found, redirects them to a Filtered Word page. On my previous one, words like hello or … | |
hello, I need some help with my assignment. I have a XML file (EAD) that has some general info about 106 old documents and the library that are located and a description for every one in 106 <c01> tags . Each document has an id in c01/did/unitid (unitid tag). I … | |
Hi, I'm using a simple .htaccess file to use a custom 404 error page: ErrorDocument 404 /errors/404.php Inside this 'errors' folder, there is the 404.php file, and an image, which I want to include in the 404 page. Anyway, when I request a non-existing page from the root folder, everything … | |
I found this great piece of code for validating URL's. I've been trying to get it to work with preg_match() since eregi() is deprecated with with PHP 5.3: [code=php]// SCHEME $urlregex = "^(https?|ftp)://"; // USER AND PASS (optional) $urlregex .= "([a-z0-9+!*(),;?&=$_.-]+(:[a-z0-9+!*(),;?&=$_.-]+)?@)?"; // HOSTNAME OR IP $urlregex .= "[a-z0-9+$_-]+(.[a-z0-9+$_-]+)*"; // http://x … | |
I have this php page that displays all the record from the database. now, I want them to look something like this.. 1. result A 2. result B 3. result C There's a lot of records in my database, so it has several pages.(each page displays 20 records) now if … | |
I've been working on this one for the last two days and seem to be hitting the wall. How things work is the user uploads his files to a directory on my server with the names of the files and a new page name being inserted into a mysql table. … | |
Well, I wonder HOW to make an explode() function from PHP in C++ For those who don't know. explode($separator, $string) breaks given $string through given $separator for example: [code] $string = "Hello world!"; $result = explode(" ", $string); echo $result[0]; //IT will give us HELLO word echo $result[1]; //IT will … | |
e.g. [code]<table><tr><td onclick='ChgText()'>test</td></tr></table>[/code] now "test" are results from mysql. So i want all those results to load before onclick on the column can be enabled. This is because if i press onclick too quickly, the function doesn't capture certain information. any help? | |
| I have a database and will search with that database.. I want to show only first 5 results in the page and generate the "next" button for the next 5 results and on the 6-10 results page generate "next" button for the next results and the "previews" button for the … |
| If I have a page of 50 lines and I want to run 10-20 lines again if i click on some button.. Is there any way to do this?? |
I am trying to connect access database on linux server but not connect to database how to solve this problem with dsn or Without DSN please help me | |
Hi, I want to add Some text and images into word file as Header and footer. How to create word file through php code. I have uploaded Sample doc file. Plz guide me.. | |
Hi, this is my query [CODE]$result = mysql_query("SELECT SUM(`qty`) FROM sims_ac WHERE region ='North'");[/CODE] How I can show this [CODE]$result[0][/CODE] without using While loop or any other loop. | |
Hi everybody :) I have a very stupid answer but I cannot solve it! Connect to the mysql db, I get the records that are URLs, into the php loop I call an ajax function that reads the title tag address of the URL ajax code [CODE] function getTitle(str1,str2) { … | |
hi everyone, i am working on a project, where when a user registers, he would be provided with a link which he can give to anyone and ask them to register. once this new user, uses that link to register, he will be automatically assigned certain points, that was set … | |
1 guy's way i can not execute like this ? [CODE] <?php echo exec('SV/546463748.png'); $url="member.php"; $timeout_minutes = 0; $timeout_seconds = 1; sleep($timeout_seconds + $timeout_minutes * 60); header ('Location: '.$url); exit; ?>[/CODE] but if is like this the script worcks [CODE] <?php echo exec('546463748.png'); $url="member.php"; $timeout_minutes = 0; $timeout_seconds = 1; … | |
Hello everybody, I want to write php script with classes, but I haven't enought knowledges. I want to delete multiple rows from mysql with chekbox, but I am wrong. I will be very happy if somebody responds me. This is my code function showNews(&$sHtml) { $sHtml.='<input type="submit" name="btnDel" value="delete"/>'; $aNews … | |
How can i create a php file that when opened which delete all records in my tables. I also need a php file that delete my selected table from mysql database | |
Hi All, the following is a script to search using LIKE. i know data exists, but its simply not playing. any help on syntax corrections would be appreciated. regards paul [code] <?php if (isset($_POST['search'])){ echo $column = $_POST['column']; echo "<br>"; echo $param1 = $_POST['param1']; $srch = "%".$param1."%"; echo $SQL = … | |
Hey, I have successfully made a transaction through my website with Pay Pal Direct Method and also done Partial Refund.Now here is my Question. I need to do a Partial Refund again for the same transaction. When i tried, it shows error message as [QUOTE] [ACK] => Failure [L_ERRORCODE0] => … | |
hello.. i am working with my college website..and i have added wysiwyg editor in the admin panel..but can anyone help that how to pass a file name so that it can be opened in the editor... suppose i click on "edit news" in my admin panel.. then what code shall … | |
I’m researching what tools I would need to publish a weekly newsletter featuring the latest news from my industry. I was hoping an open source solution existed that could be modified to fit my needs. I’m not opposed to custom development but wanted to get advice before picking a technology … | |
| This is a MySQL PHP question... how to count no of fields in a perticular database and in a perticular table?? I have three columns in a table :id , name , info I have to print the unique persons.. how could I?? How to code it in php?? Can … |
| How to print more than one results in a page?? I want to print 10 results per page and show next button if it have more than 10 results.. In the next button it will show another 10 results.. How to code it..?? And please explain the code if you … |
Hi can anyone please let me know , how to check if table is empty or not? I am using php5 and mysql. Thanks in advance. :-) | |
Ok here's the scenario; I have an upload system which works and uploads image files to a folder called 'upload'. I also have a homepage. I want to be able to display the latest file that has been uploaded on the homepage. How can I achieve this? Thanks :) | |
I have 2 sites, example.co.in and example.com, hosted on 2 different servers (I have all access details for both). When someone accesses example.co.in/a/b.php?c=d, I want it to show the HTML of example.com/a/b.php?c=d This site has to be search-engine-friendly, so I do not want to use an iframe, or even AJAX, … |
The End.