39,320 Topics
| |
<?php include("db.php"); $result1 = mysql_query("SELECT DATE_FORMAT(CURDATE(), '%Y-%c-%d %H:%i') "); $row=mysql_fetch_array($result1); $from=$row['0']; echo $from; echo "<br>"; $result2 = mysql_query("SELECT DATE_FORMAT(CURDATE() - INTERVAL 2 DAY , '%Y-%c-%d %H:%i')"); $row1=mysql_fetch_array($result2); $to=$row1['0']; echo $row1['0']; $result3 = mysql_query("SELECT * from pr where date between '$to' and '$from' "); $row3=mysql_fetch_array($result3); //$to=$row3['0']; echo $row3['0']; echo $row3['1']; ?> | |
i have a database (hello) and it has 2 tables 1. login_tbl and 2. users_tbl both contains the 3 fields id,username,password and id,first_name,last_name respectively. now plz help me to write the php code according to this which helps to search the users details in users_tbl and fetch all the records. … | |
i have created a page which has a table that enables user to delete a record via a delete button but somehow the queary isnt working. php coding <?php include("dbase.php"); $idURL = $_GET['id']; // Connect to database server mysql_connect("localhost", "root", "") or die (mysql_error ()); // Select database mysql_select_db("studiobooking") or … | |
I have six number sets. Each have two digit number which range between 01 to 49. How to create all possible combinations? And how to calculate total number of possible combinations? e.g 1. Number set:- **A B C D E F** 2. Lower Limit:- **01 01 01 01 01 01** … | |
Hello guys, i already have my databases and scripts working, and i was implementing a small webserver under windows 7 with xampp. But after configuring all needed in apache, i can see the pages in the server but non of the clients can see the pages. No error is displayed, … | |
hi need a very big help..and im a newbie in this field im keep getting the same error "Parse error: syntax error, unexpected 'button' (T_STRING), expecting ',' or ';' " here the code : <!--FORM--> <form method="POST" action="BookingnDisplay_Process.php"><!--link to DB--> <br> <h1><center>TALENT STUDIO Booking form</center></h1> <u><strong>Please read carefully.</strong></u></p> <p><strong>1. If … | |
Hello, I have read numerous forums on this issue and is seems each case/resolution is specific to the persons file. I have the same error, but can't find where it is coming from. This is from a wordpress site I did not create - this just appeared out of nowhere … | |
Hello guys, now that i have all my scripts up and running i need some help configuring virtualhosts on Apache/Xampp/Win7 The Httpd-vhosts.conf like this: <VirtualHost *:80> ServerAdmin joao.dias@centralcervejas.pt DocumentRoot "C:/xampp/htdocs" ServerName kadar ServerAlias www.kadar <Directory "C:/xampp/htdocs/" > Options Indexes FollowSymLinks ExecCGI Includes Order allow,deny Allow from all </Directory> </VirtualHost> The … | |
Sir, I have following codes <?php $country=""; $capital=""; if (isset($_POST['submit'])) { $country=$_POST['text1']; $capital=$_POST['text2']; echo '<script type="text/javascript">alert("The capital of " .$country. "is " . $capital)</script>'; } if (isset($_POST['clear'])) { $country=""; $capital=""; } ?> <html> <head><title>Result on same page</title> </head> <body> <center> <form name="form1" action="same_browser.php" method="post"> Country<input type="text" name="text1" value="<?php echo $country;?>"><br> … | |
Hi htaccess is not working in godaddy hosting. but it is working in other servers. Please help me to solve this. Thank you | |
hi, i want permutation for all alphabets with word length is 8.but i get only permutation for 4.pls help me to debug this issue code: <?PHP FUNCTION permutations($letters,$num){ $last = STR_REPEAT($letters{0},$num); $result = ARRAY(); WHILE($last != STR_REPEAT(lastchar($letters),$num)){ echo "$last"; $result[] = $last; $last = char_add($letters,$last,$num-1); } $result[] = $last; RETURN … | |
I'm working on a insert form for my movie database and I have some code working and will be adding more to it, but I wanted to know if there was a better way to go about doing some of this or if I have made a huge coding error. … | |
creating a simple news feed just like facebook is not the problem but instead of posting text i want users to post videos and audios also so other users can watch the videos and play the audio files | |
hi, i want to display output line by line using jquery.i tried many times but it not works..pls help me.. Html Code: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"> </script> <script type="text/javascript"> $(document).ready(function(){ $('#sub').click(function(){ $('#msg').html("<center><img src='http://46.16.168.75/saranya/images/9%20(1).gif' alt='LOADING...' width='20' height='20'/>Loading........</center>"); $.ajax({ type: "POST", url: "ping1.php", data: $("#form1").serialize(), success: function(data) { $('#msg').html(data); alert(data); } }); return false; … | |
I'm changing some things around on my webapp and one of the major changes is assets are now stored in S3 (via filepicker.io) rather than locally. Here is some code I have to generate a zip file from an array of files //example values //loc could be uploads/1/7878837474test.jpg //name coule … | |
Can I use <? echo 'somethig'; ?> instead of <?php echo 'something'; ?>. <? ?> tags(without php keyword) working in apache2triad but not in wamp or xampp servers.Why is that.How can I make wamp or xampp to run php codes with <? ?>. Thanks. | |
Hi, I am trying to encrypt a xml to smime format. I am having some problems while creating the encrypted file. This is my code for encrypting the file $signcert = 'file://'.realpath('cert.public.pem'); $privkey = 'file://'.realpath('cert.private.pem'); $pubkey = 'file://'.realpath('ttt.pem'); openssl_pkcs7_encrypt("Sample1.xml", "smime.xml",$pubkey,$headers,0,1); $headers =array(); openssl_pkcs7_sign("smime.xml", "smime.p7m", $signcert,array($privkey, "123456"),$headers ,PKCS7_DETACHED ); This is … | |
hi there, need some urgeny help. is there a way to from my web application php/mysql create an email which will go to outlook and send via outlook? so user uses the web application to input customer details. create message with attachments from the server and then presses a button … | |
Hi All, I am trying to connect to a database OOP singleton method. I am getting an error "syntax error, unexpected 'function_construct'" and I unable to find the syntax error in the code. Any help with this would be appreciated. Thanks in advance David // Page: index.php <?php require_once 'classes/db.php'; … | |
Dear friends on daniweb, First of all hope all of you are ok. I post this article to suggest me some ideas about the attachment of paypal in php. I wish to try a booking site for travelling(as a dummy at this stage). For this, php language is better than … | |
im trying to get a data from database into a text field: $fothersq=("SELECT others FROM january"); $fothers=mysql_query($fothersq); <input type="text" placeholder="0" name="febothers" size="11" value="<?php if(@$fothers){echo htmlentities(@$fothers);} ?>"> but i got this error in the text field instead. <br /><b>Warning</b>: htmlentities() expects parameter 1 to be string, resource given in <b>C:\xampp\htdocs\CashFlow\febprev.php</b> on … | |
I had created a child theme. So i want to know some basic question about child theme. 1) i had create a child theme.If i am updating the theme, What should be happened ? I mean all customization which i had does manually is remain there in parent theme after … | |
Hi all, I had two website in different servers. Both website had same headers. so if login one server website and going to another website i want same session in this website. how to pass the session values to this server. And also if logout server means both servers sessions … | |
in a site http://www.example.com/ there are files one of them is called images that contain images when I try to access http://www.example.com/images/ , although the address is 100% true , I get a white blank empty page why??? and how to get the content of http://www.example.com/images/ | |
I have a names database with only 4 fields (Sex, Origin, Meaning, Starts With) and html search form for those same 4 fields. Can anyone give me the php code so that if anyone fills in any or all of the form fields, the results from the database will be … | |
Hello Daniweb members. Im looking to create a script which checks the current date and time (of web server to ensure a pre-set time zone) and display a message. *What i'm aiming for the script/s to do. *Check current date and time *If day = eventDay BUT time = before … | |
so i found this script which is perfect.. it loads all my content from my ftp and randomizes them.... BUT you always have to refresh the site.. my question now is.. how can i add a fixed frame or just a button which allows me to refresh the pictures instead … | |
I have the following code which I use in PHP-Liquid template engine. I want the ability to add or delete rows trough phpMyAdmin instead of adding/deleting new arryas. So I need to use MySQL, but how should I proceed to work it out with my example? $assigns = array( 'blog' … | |
Hello ! How can i submit a form but remain on the same page : <form enctype="multipart/form-data" method="post" action="script.php"> ----- ----- </form> it goes to script.php thank you. | |
Hi Master, please help me, i could not insert my multiple checkbox selected value into my table. please see and help me. its insert only one value like first one. here is code: **HTML code: ** <td width="75%"> <input type="checkbox" name="whats_include[]" value="Breakfast" > Breakfast / <input type="checkbox" name="whats_include[]" value="Lunch" > … |
The End.