-
Displaying 3 random tables from a possible 5
Done it!! You'd put commas instead of semi colons. You were a great help though, thanks a lot.
-
Displaying 3 random tables from a possible 5
Hi thanks for your help but that brings up the error: Parse error: syntax error, unexpected ')', expecting ';' in E:\webserver\wamp\www\Archived Sites\avis\index.php on line 67 Line 67 is this one for ($i = 1, $i<=3,$i++) Cheers
-
Displaying 3 random tables from a possible 5
I have 5 tables called table1.php table2.php etc. I wish to pick 3 of these at random and display them on a web page. I'm currently using the code: <?php $numTables = 3; $a = range(1, $numTables); shuffle($a); foreach($a as $i) include('table' . $i . '.php'); ?> However this picks 3 out of the first 3 tables and displays them randomly (meaning 2 never get picked). I've also tried <?php $numTables = 5; $a = range(1, $numTables); shuffle($a); foreach($a as $i) include('table' . $i . '.php'); ?> but this displays all 5 randomly. Is there a way of using the second peice of code and giving it a limit of 3? Many thanks for any help.
-
Typing over images in DW?
You could have the image as a background within the CSS and type over it in the HTML.
-
cms for a webdevopment company
We use our own, we have a basic code for things like updating copy, adding files, adding images etc and then select what is relevant and customise it for each project. I find most CMS's try to be everything to everyone and I just find it easier to use my own as I can adapt it to what the client wants.
-
Hello from Cambridge
Another one from Cambridge here, welcome.
-
Web page size
If I'm doing a fixed width site I tend to do it 960px wide. I use 960 because it is easy to divide for columns and most of the information will still be there for someone using 800x600.
-
How the hell does 3D cinema work?
Channel 4 are doing a 3D season which they are starting in a few weeks. Sainsburys are giving away the 3D glasses and then Channel 4 will transmit certain programs in 3D.
- Count to 1 million
- Count to 1 million
-
Created a simple contact form but...
You need 3 seperate files, the contact.php file the process.php file and then the thankyou.php file. Here is a quick form example. Contact.php Insert this (or similar depending on what information you need) into your contact page. <form action="process.php" method="post"> <p>Name: <input type="text" id="name" name="name" value="" size="30" /> </p> <p>Company: <input type="text" id="company" name="company" value="" size="30" /> </p> <p>Email: <input type="text" id="emailaddress" name="emailaddress" value="" size="30" /> </p> <p> Phone: <input type="text" id="telephonenumber" name="telephonenumber" value="" size="30" /> </p> <p> <input type="reset" name="reset" value="Reset" /> <input name="submit" type="submit" value="Submit" /> </p> </form> Process.php <? $message .= " Planners submitted Interest ------------------------------ Name: " . $_POST['name']. " Company: " . $_POST['company']. " Email Address: " . $_POST['emailaddress']. " Telephone Number: " . $_POST['telephonenumber']. " "; $to = "adam@roystonsimpson.co.uk" ; $subject = 'Planners submitted Interest'; $mailHeaders = "From: No Reply "; $mailHeaders .= "<noreply@roystonsimpson.co.uk>\r\n"; mail($to, $subject, $message, $mailHeaders); header ("Location: thankyou.php"); exit; ?> Thankyou.php Just a normal webpage but with some thank you text on it.
- Count to 1 million
-
ie8 and ms publisher
Sweet jesus, I've done content management systems with less code than that.
-
-
Problem setting up local webserver
I have Vista 64 and I've just posted instructions here http://www.webdesignerforum.co.uk/topic/25315-php-include/page__p__170051entry170051
-
php include
Here are the instructions for downloading and installing Wampserver and adding your website site to the server. (If you have windows, use MAMP if you have a mac) Go to www.wampserver.com/en Click Downloads Click DOWNLOAD Wamperver 2.0i Click the green Download now! button *Click run Wait for the file to download *Click allow Click next on the Wampserver setup wizard Accept the terms and click next Click next Click next Click install Choose your default browser (if you have more than one installed) *Click unblock Leave the SMTP as localhost and the email as you@yourdomain Clicknext Click launch now A small icon will appear on the right hand side of your taskbar (near the clock) it looks like a white bridge, left click this icon and click www.directory Copy and paste the your website folder into the directory. When its finished copying left click the bridge icon on your taskbar again and click Localhost Under the title Your projects you should see a link called whatever the name of your site folder was. Click this and (fingers crossed) the site will open. *depends on the security settings on your PC.