Member Avatar

Hi, I trying select records where a field contains only one character of a string of characters. i.e. [code=sql]SELECT * FROM users WHERE user_role [contains any one character from...] 'ASD'[/code] so in this case, the query would return all records where the value of 'user_role' field is either 'A' or 'S' or 'D'. Any ideas how can I achieve this?

Member Avatar
0
14
Member Avatar

I'm trying to use DIVs contained within a DIV to show content which is centered horizontally on the page, as per this example. +=========== DIV 1 ===========+ +------+=====+=====+=====+-------+ +------+ DIV 2 + DIV 2 + DIV 2 +--------+ +------+=====+=====+=====+-------+ +==========================+ Here's the CSS and HTML code I'm using: CSS [CODE] .DIV1 { width: 100%; margin-left: auto; margin-right: auto; height: 70px; } .DIV2 { float: left; text-align: center; width: 80px; } [/CODE] HTML [CODE] <div class='DIV1'> <div class='DIV2'>Content 1</div> <div class='DIV2'>Content 2</div> <div class='DIV2'>Content 3</div> </div> [/CODE] I've learnt that by setting margin-left and margin-right to 'auto' in DIV1 the content …

Member Avatar
0
15
Member Avatar

I am building a website for users that exist around the world and need to show the user's "local machine" time and timezone, not the time of the website host server. Is there a javascript function or process to determine this?

Member Avatar
0
3
Member Avatar

I am building a project management website which enables users from around the world to login and automatically register their time against various work projects. I need to save their login time to the database using their "local machine" time (the time as it exists for them, not the time of the website host server), and also their timezone information - so that I can determine where and what time in the world each user is logging in from. I am already familiar with writing PHP code to save records to the database, but what I need to know is... …

Member Avatar
0
5
Member Avatar

In my webpage I'm using the PHP function mysql_fetch_array to check if records are successfully retrieved from the database. If records are returned then I can assign variables with the database fields... [code=php] $checkdb = mysql_query("SELECT * FROM products"); if ($info = mysql_fetch_array( $checkdb )) { $productName = $info['ProductName']; } [/code] But how do I check when I change the SQL to an UPDATE or INSERT query if it has worked successfully? I obviously don't want to use the same method as there's no requirement to assign variables from the record fields (as in the example above), but still want …

Member Avatar
0
3
Member Avatar

Hi, I'm using a joomla cms to build a website, and have discovered that joomla uses a built-in plug-in called Email Cloacking which obfuscates email addresses prior to showing them on the webpage. They simply appear as "mailto" links which makes it harder for scrapers and bots to pick up. However, I am developing a website that requires user-login access to pages where user's email addresses need to be shown (and edited) as plain text inside text boxes. I've had to disable this joomla plug-in so that email addresses do not contain the additional javascript and scrambled information for spam …

Member Avatar
0
4
Member Avatar

Hi, I'm not entirely sure which forum to post this question because I cannot determine whether it's a MySQL, Joomla, or PHP issue. But I will post it here, as some of you may know about this. I am using a custom built "user" table in my MySQL database, and the email addresses are being stored in plain text as VARCHAR(60). However, when I retrieve an email address from a record, and then display it on my webpage, it appears as an "email link" and not as plain text. This is the code I'm using to retrieve the email address …

Member Avatar
0
9
Member Avatar

Whenever I echo or print a string containing an email address to my webpage the HTML code automatically parses the text and shows it as a "mailto" link. If I use... echo "Hello"; it prints Hello as expected on the webpage. If I use... echo "hello@whatever.com"; it now appears as a mailto link, and if I look at the HTML code source the email address now contains all of this additional javascript... [code=JavaScript]<script language='JavaScript' type='text/javascript'> <!-- var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy27400 = 'myemail' + '@'; addy27400 = …

Member Avatar
0
12
Member Avatar

Hi I am developing a login screen for my website, with usercode and password fields, and a Login button. I need to know how I can make the Login button automatically submit when the user hits the Enter key in either field (as apposed to the user clicking the Login button, which already works). Thanks Nigel

Member Avatar
0
19
Member Avatar

I have a website using MySQL database. When I retrieve any user's email address from my user table and show (echo) it to the webpage it always appears as a link. How can I show user's email address as plain text? Thanks Nigel

Member Avatar
0
8

The End.