Search found 25 matches

by jeaux
Sat Nov 14, 2009 7:38 am
Forum: PHP - Code
Topic: Place bold tags on last eight characters of query return
Replies: 2
Views: 133

Place bold tags on last eight characters of query return

I'm returning from a MySQL DB a vin # for a car and would like to highlight the last 8 characters. Looking for some clues as to where to start my research. this would be ideal:   <?php $con = mysql_connect("DELETED"); if (!$con)   {   die('Could not connect: ' . mysql_error());   }   mysql...
by jeaux
Sun Sep 06, 2009 8:49 pm
Forum: PHP - Code
Topic: Loop for If Else
Replies: 3
Views: 133

Re: Loop for If Else

AlanG that was the nicest backhanded compliment I could have expected lmao. Thanks for taking the time to work it out. If I ever get it working will post the finished code.

Thanks,
Joe
by jeaux
Sun Sep 06, 2009 6:24 pm
Forum: PHP - Code
Topic: Why does this not work?
Replies: 4
Views: 172

Re: Why does this not work?

Solved. Many thanks for help with a supernoob prob.
by jeaux
Sun Sep 06, 2009 5:41 pm
Forum: PHP - Code
Topic: Insert into MySQL DATE
Replies: 4
Views: 138

Re: Insert into MySQL DATE

Many thanks. After playing around with it and realizing I didn't need any of MySQL's date functions I decided on using an unsigned integer and using php's unix time stamp. HTML   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-tra...
by jeaux
Sun Sep 06, 2009 5:29 pm
Forum: PHP - Code
Topic: Why does this not work?
Replies: 4
Views: 172

Re: Why does this not work?

the output of a "view source" has the php code in it.   34 Rows <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Admin<...
by jeaux
Sun Sep 06, 2009 3:32 pm
Forum: PHP - Code
Topic: Why does this not work?
Replies: 4
Views: 172

Why does this not work?

The MySQL db   -- phpMyAdmin SQL Dump -- version 3.2.0.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Sep 06, 2009 at 03:24 PM -- Server version: 5.1.37 -- PHP Version: 5.3.0   SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";   -- -- Database: `cars1` -- CREATE DATABASE `car...
by jeaux
Fri Sep 04, 2009 12:47 pm
Forum: PHP - Code
Topic: Loop for If Else
Replies: 3
Views: 133

Loop for If Else

This code works but has to be a better way. dateofloss is a unix time stamp. This will query the DB and then populate the text boxes with the data and select the appropriate drop down options. I was thinking that 3 loops could clean the code up, but can't vision how to.   <?php $con = mysql_connect(...
by jeaux
Mon Aug 17, 2009 6:14 am
Forum: PHP - Code
Topic: Insert into MySQL DATE
Replies: 4
Views: 138

Re: Insert into MySQL DATE

As of now the MySQL field is set to DATE and it expects a format like this. yyyy-mm-dd. But if I put 2009-01-01. It gets stored like this 0000-00-00. I will in the future be needing to do calculations with the date, but can't even get it entered into the table as of yet.
by jeaux
Sun Aug 16, 2009 3:39 pm
Forum: PHP - Code
Topic: Insert into MySQL DATE
Replies: 4
Views: 138

Insert into MySQL DATE

pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: Posting Code in the Forums to learn how to do it too. 2 questions here. First the html   <!DOCTYPE html PUBLIC "-//W...
by jeaux
Thu Sep 25, 2008 1:18 am
Forum: Regex
Topic: Search box with preg_match
Replies: 2
Views: 964

Re: Search box with preg_match

Thank you so much. I needed an investigative lead. Efficiency is my goal but as a noob some ideas just seem unattainable.
by jeaux
Wed Sep 24, 2008 9:23 pm
Forum: Regex
Topic: Search box with preg_match
Replies: 2
Views: 964

Search box with preg_match

If I'm doing a recipe site with a MySQL DB is preg_match the way to go? The table will be setup with recipe_id, recipe_name, recipe_description, and recipe_location. Every search I run on a search box only yields people talking about using a Google API.

Many thanks,
Joe
by jeaux
Fri Sep 19, 2008 11:19 pm
Forum: PHP - Code
Topic: uniqid() to stop a reload
Replies: 1
Views: 179

uniqid() to stop a reload

This is what I have. MySQL table: CREATE TABLE IF NOT EXISTS `universitymenu` (   `MenuItemID` int(11) NOT NULL auto_increment,   `MenuCategoryID` int(11) NOT NULL,   `Order` int(11) NOT NULL,   `ItemName` varchar(100) NOT NULL,   `ItemCost` decimal(10,2) NOT NULL,   `ItemDescription` varchar(255) N...
by jeaux
Sat Sep 06, 2008 3:16 am
Forum: PHP - Theory and Design
Topic: Authentication
Replies: 1
Views: 518

Authentication

What is the best way to set up an authentication script for users with different permissions in a MySQL DB. Let's say that there's zone_a, zone_b, and zone_c. There's super_user, user_1, user_2, and user_3. There should be no restrictions for super_user, and that user should be able to set permissio...
by jeaux
Sun Aug 31, 2008 6:04 pm
Forum: Databases
Topic: MySQL order
Replies: 7
Views: 848

The ugliest code known to man

OK, so as the title suggest prepare yourself for the gory details. This is the script that lists all the Category Items and the corresponding Menu Items for each Category with a picture of an arrow between Menu Items. Remember you have been forewarned. <?php     $conn = mysql_connect($dbhost, $dbuse...