Internet Computer Mobile Games

Programming Help

10048 Posts - Page 503 of 503

Extract Date From Sentence

Hi guys,   I have a selection on sentences that I have stored as strings.   They all contain dates in different formats. e.g.     "By Himanshu Singh on 30 July 2014" "By Marc Shoffman - November 26th 2013, 3:47:09 pm" "Tue Sep 23, 2014 6:33pm BST"   Is there a way to extract just the date from this and turn it into a standard format. For example dd/mm/yyyy   Many Thanks for any help   Mike  

Novice - Lottery Ticket Generator

Struggling with creating the following:   a. The authorized user can select one or both of the two available lottery services (in form of checkboxes) provided by your website.   Generate six sets of LOTTO 6/49 numbers (sorted in ascending order) when option one,  labeled as “LOTTO 6/49”,  is checked. One set of  “LOTTO 6/49” numbers consists of 6 unique numbers between 1 and 49 inclusively.   Generate six sets of LOTTO MAX numbers (sorted in ascending order) when op

How to handle sessions in sign up registration page in PHP using mysql ?

Please help me out with sessions . I m new to this topic.

Validation

I need to validate first name, last name, street, suburb, postcode, email, status and date of birth.    I tried to do this validation but gave me heaps of error and I messed up more. Spoiler if (empty($firstname)) {$errors[] =" First Name Can not be Empty <br> ";} if (empty($lastname)) {$errors[] =" Last Name Can not be Empty <br> ";} if (empty($street)) {$errors[] =" Street Can not be Empty <br> ";} if (empty($suburb)) {$errors[] =" Suburb Can n

msql database php help

I am trying to display items from my database that occur after the current date but within the next 28 days. I have wrote my script and the part that retrieves the information from the database works in phpmyadmin however when I load the page in the browser nothing below my php script is showing up on the page, where have I gone wrong? <?php //connect to the database include 'php/database_connection.php'; //retrieve all the information for the events within 28 days of the current date from t

convert associative array to multidimensional

this is my solution: $x = ['a' => 2, 'b' => 1, 'c' => 4, 'd' => 1]; $x1 = array_keys($x); $x2 = array_values($x); $z = []; for ($i=0; $i<count($x); $i++) { array_push($z, [$x1[$i],$x2[$i]] ); } print_r($z); //[['a', 2], ['b', 1], ['c', 4], ['d', 1]]; is there easier (more elegant) way to do the same ?    

Insert and Update

if(isset($_POST['lqlabour'])) { //insert quoted labour foreach ($_POST['lqlabour'] as $k => $lqlabour) { $ldescription = $_POST['ldescription'][$k]; $llabour = $_POST['llabour'][$k]; $lhelper = $_POST['lhelper'][$k]; $lmarkup = $_POST['lmarkup'][$k]; $ltotal = $_POST['ltotal'][$k]; if ($ltotal == '0.00'){ $lstatus = "2"; } else { $lstatus = "1"; } $sql = "INSERT INTO quotedlabour VALUES ( NULL, $quoteid, $k,

Problem in Word VBA, Please Help

Hi I am creating a word form. I want the people filling in the word form to embed a pdf file into the word form. I want a VBA code which will check if the PDF is embedded into the word document. If not it should give a alert asking the user to embed the PDF doc. Can anyone give me the VBA for this.:confused::confused: Thanks, Srikar

Design Apple Development Security Automobile Network Photography Health Money Travel Shopping Issues Operating systems Drivers Software Programming Tech Home Science Sport Solution