Go Back   CodingForums.com > Search Forums

Before you post, read our: Rules & Posting Guidelines

Showing results 1 to 25 of 500
Search took 5.01 seconds.
Search: Posts Made By: Len Whistler
Forum: General web building 10-16-2012, 12:19 AM
Replies: 2
Views: 5,394
Posted By Len Whistler
In "Post a PHP snippet" I posted a fully...

In "Post a PHP snippet" I posted a fully functional PHP function to convert currencies in real time using Yahoo Finance. It's also good for stocks. The quotes from Yahoo are very accurate.

Real...
Forum: PHP 10-14-2012, 05:29 AM
Replies: 4
Views: 404
Posted By Len Whistler
I'm not sure of the exact syntax but I would also...

I'm not sure of the exact syntax but I would also consider setting the jpg quality settings - maybe try a 90. The quality would be the last change made to an image, just before saving it.

Quick...
Forum: PHP 10-12-2012, 01:57 AM
Replies: 2
Views: 293
Posted By Len Whistler
$sum = round(11 / 55,1);// example 11 miles ...

$sum = round(11 / 55,1);// example 11 miles

$hours = floor($sum);
$minutes = ($sum - $hours)*60;


echo "$hours hours and $minutes minutes";

Output
0 hours and 12 minutes
Forum: PHP 10-10-2012, 05:57 PM
Replies: 3
Views: 345
Posted By Len Whistler
You use a foreach loop. The example below is a...

You use a foreach loop. The example below is a quick one so there might be syntax errors. You can also assign the output to variables, instead of echoing it out.


$array = _POST['OptionA']; //...
Forum: PHP 10-07-2012, 01:19 PM
Replies: 2
Views: 268
Posted By Len Whistler
I would try coding a forum, or a shopping cart. ...

I would try coding a forum, or a shopping cart.



-----
Forum: PHP 10-07-2012, 03:07 AM
Replies: 3
Views: 434
Posted By Len Whistler
The function below should be OK. Some of the...

The function below should be OK. Some of the results are different than yours so it might need fine tuning.

<?php

function elapsed_time($seconds, $precision = 2) {

$a = array('decade' =>...
Forum: PHP 10-02-2012, 08:49 PM
Replies: 14
Views: 782
Posted By Len Whistler
I went into my "php code vault" and came up with...

I went into my "php code vault" and came up with this code I used for spell checking. It uses the browsers spell checking features to check my text before I enter it into the database.

Create a...
Forum: PHP 10-01-2012, 04:51 AM
Replies: 6
Views: 427
Posted By Len Whistler
doulbedee are you asking about this sort of...

doulbedee are you asking about this sort of nesting?


<?php

function one() {
}

function two() {
one();
Forum: PHP 09-27-2012, 05:19 PM
Replies: 7
Views: 675
Posted By Len Whistler
I would used 3 database tables set up something...

I would used 3 database tables set up something like this:

PARENTS
parents_id | name | cell | email
0001 | Ben Smith | 555-5555 | ben@hotmail
0002 | Rick Brown | 555-4532 | rick@yahoo.com
0003...
Forum: PHP 09-25-2012, 07:38 PM
Replies: 2
Views: 376
Posted By Len Whistler
I would use a drop down menu. The value would be...

I would use a drop down menu. The value would be set 21:00.


---
Forum: PHP 09-24-2012, 04:59 AM
Replies: 1
Views: 249
Posted By Len Whistler
You can use PHP. Any time one of your pages is...

You can use PHP. Any time one of your pages is loaded you can deactivate the free trial for anybody - even if it wasn't them that loaded the page.



----
Forum: PHP 09-23-2012, 08:34 PM
Replies: 2
Views: 264
Posted By Len Whistler
Could you provide more info on what sort of data...

Could you provide more info on what sort of data is in those columns? It looks to me maybe 2 or 3 tables might be better, but it depends on what is in the database.



---
Forum: PHP 09-23-2012, 05:52 AM
Replies: 8
Views: 477
Posted By Len Whistler
Download XAMPP:...

Download XAMPP: http://www.apachefriends.org/en/xampp.html

You can't begin to learn PHP/MySQL on a live website. Develop your code on your home pc then upload when completed.




---
Forum: PHP 09-23-2012, 05:32 AM
Replies: 2
Views: 239
Posted By Len Whistler
I would use htaccess to make pretty URLS. And I...

I would use htaccess to make pretty URLS. And I would put the link to the summary in another table and join them during the query. The <a href="http://local.debbie/ portion would be in the while...
Forum: PHP 09-20-2012, 04:57 AM
Replies: 20
Views: 990
Posted By Len Whistler
gazaian1 ..... Before you go further I highly...

gazaian1 ..... Before you go further I highly recommend you clean up your code. It looks like you google bits of code and stick them together.

You don't need all those PHP opening and closing...
Forum: Post a PHP snippet 09-19-2012, 09:41 PM
Replies: 0
Views: 1,340
Posted By Len Whistler
Deleting comment/forum posts without an admin panel

Below is a script that you can "delete" posts without an admin panel, you use the URL and $_GET[''] instead. The idea is to make removing posts as easy as possible from any computer without bothering...
Forum: PHP 09-18-2012, 09:43 PM
Replies: 20
Views: 990
Posted By Len Whistler
A good way to debug PHP is to View Page Source...

A good way to debug PHP is to View Page Source and see what is missing in the HTML. I use FireFox to view the page source, I don't know about IE or Opera.



---
Forum: PHP 09-18-2012, 09:13 PM
Replies: 20
Views: 990
Posted By Len Whistler
The MySQL data type should be something like...

The MySQL data type should be something like VARCHAR or TINYTEXT maybe 30 characters for an image file name. You don't need BLOB.





---
Forum: PHP 09-18-2012, 08:21 PM
Replies: 20
Views: 990
Posted By Len Whistler
I wouldn't store the path to the image in the...

I wouldn't store the path to the image in the database, just the file name - with or without the ext. Ex: ny-city-9456.jpg or ny-city-9456

The image path should be in the while loop that queries...
Forum: PHP 09-13-2012, 05:31 PM
Replies: 2
Views: 339
Posted By Len Whistler
This block of code appears to do nothing, I think...

This block of code appears to do nothing, I think you can delete it along with the last curly brace that goes with it.

if (empty($info2['french'])) {} // if no words don't print anything
...
Forum: PHP 09-13-2012, 01:37 AM
Replies: 5
Views: 632
Posted By Len Whistler
The selected boxes are added to an array, and you...

The selected boxes are added to an array, and you retrieve the values with a foreach loop. You need square braces around the name value in the form.

name="color[]"

<?php
if...
Forum: PHP 09-12-2012, 10:51 PM
Replies: 5
Views: 632
Posted By Len Whistler
You would need three tables. USER user_id...

You would need three tables.

USER
user_id | name | email
0001 | ben | ben@hotmail.com
0002 | ken | ken@hotmail.com

EVENT
event_id | event
001 | Boat Ride
Forum: PHP 09-12-2012, 10:37 PM
Replies: 5
Views: 632
Posted By Len Whistler
Why do you want to do this? I can't figure out...

Why do you want to do this? I can't figure out why some rows would be moved to another table. Why not add a column that defaults to 1, if those rows should be singled out then change the value to 0....
Forum: PHP 09-12-2012, 05:23 PM
Replies: 19
Views: 1,750
Posted By Len Whistler
The code below should work. if...

The code below should work.

if (isset($_POST['submit'])) {
$comments = $_POST['comments'];
mysql_query("INSERT INTO comments (comments) VALUES ('$comments')");
}
Forum: PHP 09-11-2012, 10:45 PM
Replies: 13
Views: 936
Posted By Len Whistler
Perhaps the code below might work. The title and...

Perhaps the code below might work. The title and isbn lines can be duplicated as much as you want with JQuery or Javascript and the PHP form will process it.
Title: <input type="text" name="title[]"...
Showing results 1 to 25 of 500

 
Forum Jump

All times are GMT +1. The time now is 02:56 PM.