Skip to content

Tag: php

How to make PHP store information untill purchase is complete?

I am trying to make a form that is for customizing a YouTube background. anyways. I coded this in HTML and when you hit submit, it sends the information to a PHP file that processes the information and sends it as an e-mail. This works fine but I need to set it up so it doesn’t send me the e-mail

What do the dots mean in relative file path?

I am new to programming and learning php on my own. I have two question about the following relative path of a file My questions about the relative path in the code above are that: What I understand, $_SERVER[DOCUMENT_ROOT] points to the very root directory of the file structure like htdocs, www or public_htm…

Stuck with the number pattern printing in PHP

Stuck with the number pattern printing logic. Let me know what i am doing wrong as my file is simply going on execution without giving me a pattern. My Code — Pattern to achieve — UPDATE After applying new changes following are the screenshots — Answer Your error is in the last for, that sho…

Rooms & Availability Dates PHP/MySQL

So, I’m desinging a web application that is going to work for a Hotel and it should eventually become an easy way to install for every hotel website with some extra code. The application is working with php and mysql. So, as you probably guessed, I’m pretty confused with the database structure. Th…

php date validation

Im trying to to set up a php date validation (MM/DD/YYYY) but I’m having issues. Here is a sample of what I got: Answer You could use checkdate. For example, something like this: A more paranoid approach, that doesn’t blindly believe the input:

PHP – Unzip and convert images from .jpg to .bmp

I’ve a code that unzip files that I upload to my server, it works without any problem. But now I want to add another function. I want to convert all images that are in .zip file (.zip file only contains images) from .jpg format to .bmp. There is some easy way to do it? If there is not, at least

Create cpanel database through php script

Im trying to automate the installation of some custom software using cpanel/whm and postwwwacct php script.This requires files to be copied to the users public_html folder then edit the config and set eh file permissions. So far so good, no issues. When trying to create the database im running into some probl…