- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 3
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
23 Posted Topics
Re: If all pages are of html, then use javascript, store session variable through javascript, which IDE are you using? this may help in understanding this problem. If you are thinking through htaccess, then make directory pasword protected. only admin or user you want to access those pages can access particuler … | |
Re: You can add php code in script, but you should have page with php extention and variable $date should not empty. like $date = "10-10-2015"; <script type="application/javascript"> var Date = <?php echo $date?>; </script> That should work Thanks | |
Re: http://php.net/manual/en/function.mysqli-connect.php $db_username = 'PASSWORD'; //database username $db_password = ''; //dataabse password $db_name = 'DATABASE_NAME'; //database name $db_host = 'localhost'; //hostname or IP $mysqli_conn = new mysqli($db_host, $db_username, $db_password,$db_name); //connect to MySql //Output any connection error if ($mysqli_conn->connect_error) { die('Error : ('. $mysqli_conn->connect_errno .') '. $mysqli_conn->connect_error); } | |
Re: $("#CodeName").val($("#dropdown_id").val()) this simple line get val of dropdown and populate text field | |
hi, i am trying to connect oracle with php, i had install wamp, download all dll files needed for oracle. but still getting error. Any body helps to connecting oracle with php | |
Re: Create a function like function mySearchQuery($city='',$branch_id='',$admission_year=''){//fields you want to search if($city!=""){ $city = "AND city ='".$city."'"; }else{ $city = ""; } $myQuery = "select table fields from table where ".$city.$branch_id; //fetch array ... } and call this function where you want by passing the parameters like mySearchQuery('cityName','branch_id') //and so on | |
Hi i have a problem in uploading large file. web hosting allow me to send file 256M, Code is working for small files but i try to upload 25M size file page return back without any error, and nothing happened. i also use "set_time_limit(0);" for unlimited request time In error … | |
Re: kept thing simple first get content of file through "file_get_contents" like {$text = file_get_contents("./folder/file.txt", true);} now you have array of file content in $text variable now use {echo substr_count($my_text ,"North"); } this will print number of occurrence of substring in file. Hopefully this will work for you. if yes please … | |
Re: There is much simple way to get results you want i.e First get category name $getCategoryName while{ when you get category name now is the time to get post name related to that category $getPostName where Category name = "$getCategoryName" <ol><li>$getPostName</li></ol> } that is inner loop effective one gives you … | |
Re: There are few steps to print only content on pages Is your page have dynamic and static contents, well whats type of that contents follow these 2 simple steps 1. create a page without header and footer That is because when we use print command in webpage whole page with … | |
Re: put dropdownlistbox in form tag, and post it on change event. get dropdownlistbox value in php code and apply the search from database related to your value (value get from dropdownlistbox). this is most simple way to handle search with dropdownlistbox. ![]() | |
Re: why dont u use this for deletion of record [CODE]if($act == "Delete")// act is name of submit buttn and delete is value of that button { if(isset($checkbox)) // checkbox for selection of records to be deleted { for($i=0;$i<count($checkbox);$i++) // for loop { $sql="delete from tablename where id = $checkbox[$i]"; if(mysql_query($sql)){ … | |
![]() | Re: are u creating connection with database? what error are u getting after little amendment in submit button, but i dint think is there is a problem with that. i think errors are undefined variables that u didn't handle the null values for these variables. |
Re: [CODE]$Name=$_GET["name"]; $Email=$_GET["email"]; ... $sql="INSERT INTO tablename(db_field1, db_field2) VALUES('$Name','$Email'); mysql_qyery($sql)[/CODE] This is the most simplest way to insert data into database. | |
Re: Are u saving data in database or not , if u r saving data in database then there is complete script that get values from database and make excel file and export it to the user. make a file name exportcsv.php and write the following code if(isset($_GET['type']) && $_GET['type'] !=""){ … | |
Re: its simple when u r inserting date and time ,in date and time field (insert query) write thos keyword '".date('Y-m-d')."' like $sql = "insert into table (name,addDate) values ('$name','".date('Y-m-d')."')"; this will insert date in database now to ad time stamp you can write this date('Y-m-d H:i:s' )( check format ) … | |
Re: i think first of all u have to submit form ones instead of twice. "<select name="category" onChange="this.form.submit()">" this is because when form post twice it lost the vallues. if you want to post twice then make querystring for category dropdown so that the value doesn't change. second after selection of … | |
Re: [QUOTE=Leon1958;1177635]Hi guys, I need to change my static HTML page (i.e. [url]http://www.mypage.com[/url]) with a link (<a href="http://www.mypage.com/form.php"> to a page with dynamic link - if user's URL for my page is [url]http://www.mypage.com/?123456789[/url] this 9-digit number from URL should appear in the link to the form - [url]http://www.mypage.com/form.php?123456789[/url] Thanks in advance.[/QUOTE] … | |
Re: if(isset ($_GET['id'])) { //code here } juist missing "(" for isset. ![]() | |
Re: [code=php]//try out this function function limit_words($text, $limit) { $text = strip_tags($text); $words = str_word_count($text, 2); $pos = array_keys($words); if (count($words) > $limit) { $text = substr($text, 0, $pos[$limit]) . ' ...'; } return $text; } //in html while display description <td align="left"> <? $text = strip_tags($row["description"]);// data from database field … | |
Re: This is because of your apache web server is not configured properly. You should look at the httpd.conf file for apache and change its default port to 8080 if IIS is running on your machine. As IIS runs on 80 port that could stop apache to occupy its port. [QUOTE=kssi89;906685]Hello … |
The End.