Q(Question): I understand the following script is for building a database table in MySQL, but does anyone know what are the functions of the <<< in line 3 and * in lines 4 & 10? <?php $sql_file=<<<SQL_FILE DROP TABLE IF EXISTS `table_name`;* CREATE TABLE IF NOT EXISTS `table_name` ( `id` int(11) NOT NULL auto_increment, `name` ..
Q(Question): Hello, I have the situation where I need to have a string where I need to include a PHP tag. Like $myString = "this is my string <?php echo $andthisismytag; ?>". Constructing the string is OK without errors but then when I echo it it’s empty where the PHP tag used to be. In ..
Q(Question): Hi, Just found this forum and it looks like a wealth of info! I’m not a coder and have a problem with the following brief bit of code (reportedly on line 22): <?php $d = $_GET["d"]; $m = $_GET["m"]; $y = $_GET["y"]; $d = (int) $d; $m = (int) $m; $y = (int) $y; ..
Q(Question): I created an existing sample that writes input text to a background image no problem. See here. I attempted to use a font using Imagettftext () following the steps outlined here, however I can’t get the function to create the image using the font I specified. This is the code I added to the ..
Q(Question): I am having difficulty uploading some large files using php/html form. The code has worked for file sizes up to 23MB. When I’ve tried a 50MB file, i get a blank page instead of my confirmation echo statement. My web research indicates that I needed to alter some php directives either in an .htaccess ..
Q(Question): how does one search using date "from to" while still selecting a user from a drop down list A(Answer): Hey. You should be able to just do something like: SELECT [stuff] FROM [tablename] WHERE [datefield] BETWEEN ‘2010-01-01’ AND ‘2010-02-01′; I’m no expert on Microsoft SQL Server in particular, but the basic syntax is the ..
Q(Question): Is it possible to create grid view in php?Or any thing equivalent to that?What i actually want is to query the database(mySQL) and print the result in a table form on the web page. Any help would be appreciated…. A(Answer): The way I do this is that I sort my database results into array ..
Q(Question): Hi i m trying to create two drop down list boxes where the second drop downl list box is populated based on the selection of the first one.I have searching the net for days and even the scripts i downloaded don’t seem to be working..Can anyone help me plz…..Its urgent…I have deadline approaching…. A(Answer): ..
Q(Question): This is an annoying situation that we are in at the moment and we are in need of some quick help here please. We have a web site that uses PHP scripts in the shopping cart. There is also an installation of a blogging script (b2evolution) along with a links directory script as well. ..
Q(Question): How can I verify if a domain redirect to another site? for html xml xhtml etc. A(Answer): Hey. I suppose you could use the get_headers function to check the HTTP headers the domain returns. If the response gives you a 30x status code, it is redirecting you to another location. The return data from ..