Hi guys!
Thats brilliant! I have used the explode () function and it works perfectly.
Thanks again
Laz
xxx
User Profile
Collapse
-
Separating my options
Hi all
I have a field in my database that is one long list. I want to put this list into a drop down but have each item in that list its own option.
This is how its printing at the moment:
...Code:<select name="v_options"><option value="">-- Any --</option><option value='34'>Allerton, Bolton, Bolton Woods,Bowling,Bradford Moor,Buttershaw,Clayton,Dudley Hill,East Bi
-
-
Random generator
Hi,
I have done a random script which works perfectly fine. The problem that i'm having with is the picture.
Below is the script
[PHP]include("connec t.php");
mySQL_Select_DB ("db220854136") ; //..to DB
$potms = MySQL_Query("SE LECT * FROM listings"); //now we get all from our table and store it
MySQL_Close($li nk); //there`s no need for connection,... -
Warning and Parse error
Hi guys
I have the following error:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /usr/webdata/kirkwood/config/config.php on line 2
Parse error: syntax error, unexpected T_STRING in /usr/webdata/kirkwood/config/config.php on line 2
This is the code on line 1-3:
[PHP]{\rtf1\ansi\ans icpg1252\deff0\ deflang2057{\fo nttbl{\f0\fnil\ fcharset0 Courier New;}{\f1\fswis s\fcharset0... -
i sorted it... when a completley different way...
[PHP]mySQL_Select_DB ("db220854136") ;
$randoms = MySQL_Query("SE LECT * FROM listings");
MySQL_Close($li nk);
$random_array = '';
$i = 0;
while ($entry = MySQL_Fetch_Arr ay($randoms))
{
$random_array[$i] = $entry;
$i++;
}
$random_id = array_rand($ran dom_array);...Leave a comment:
-
array_rand() problem
Hi guys
I'm trying to display one database entry randomly. So i have used array_rand(). However i have completely confused myself, and close to hitting my monitor with a tree branch.
This is my code
[PHP]srand((float) microtime() * 10000000);
$regs = mysql("db220854 136","select * from listings");
while ($reg = mysql_fetch_arr ay($regs))
{
$rand_keys... -
-
crypt and decrypt
Hiya
I have used the php function crypt to encrypt a credit card number thats going to be stored in mysql. does anyone know what funtion to use to decrypt it?
Cheers
Laz -
-
Getting PHP5 to work with MySQL
Hi,
I have installed php5 and mysql 4.1. But i can't get them to work properly. I have searched and found some sites but they all give different ways of doing it.
Does anyone know of a site that tells you exactly what to do?
The error i get when i try and load phpMyAdmin is
"Cannot load mysql extension. Please check your PHP configuration. - Documentation"
Thanks... -
Thats brilliant! Thanks ajaxrand.
So "isset" can be used if you have assigned a variable and want to check it?
This is so much easier than mine.
thanks so much!
xxxxLeave a comment:
-
Allowing two "if" statements
I have a form, and if credit card details have been entered i want it to save in the field completed a "c". However if it doesnt have the credit card details i want it to save to the field completed a "n". I have done code for it. But can you have two "if" statements in one query?
Heres my code:
[PHP]if ($submit == "Save" || $payment_cc != "")
{
$saved... -
Thats brilliant!! Thank you both for your help. Much appreciated!
CheersLeave a comment:
-
Hi
if we ignore the php for the time.
[CODE=html]<SCRIPT LANGUAGE="JavaS cript">
function doMath() {
var one = eval(document.m yform.info.valu e)
var two = eval(document.m yform.info1.val ue)
var three = eval(document.m yform.info2.val ue)
var four = eval(document.m yform.info3.val ue)
var five = eval(document.m yform.info4.val ue)
var prod = one + ...Leave a comment:
-
-
-
Calculation error
Hi all
I have a bit of javascript code that is ment to add products together. This is a form and it works fine on its own. However when i integrate it into my php script it brings up this error 'document.form. info' is null or not an object.
Heres my top code
[CODE=php]<?
include("connec t.php");
if ($submit == "Update")
{
$saved... -
-
Hiya
I don't have any code done. If you have an idea where i can find an example similar that would help me.
Laz
xxxxxLeave a comment:
No activity results to display
Show More
Leave a comment: