Archives : February-2020

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` ..

Read more

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 ..

Read more

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 ..

Read more

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 ..

Read more

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 ..

Read more

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. ..

Read more