Jump to content

Dug

Members
  • Content Count

    50
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Dug

  • Rank
    Newbie
  • Birthday 05/19/1983

Previous Fields

  • Languages
    ASP, SQL, HTML, CSS, JavaScript, Python CGI, ASP.NET, PHP

Contact Methods

  • MSN
    dug@douglasmcgregor.co.uk
  • Website URL
    http://www.douglasmcgregor.co.uk
  • ICQ
    0
  1. Dug

    File Search Problem

    Hi there, I've written a script to search files in a given directory using file_get_contents. The problem is that the script outputs PHP of the search results in the search excerpt which in my mind would be a security risk. Posted my code below. $dir = "C:/inetpub/wwwroot/FortissimoMediaPHP/"; // get all files with .php extension $files = glob($dir . "*.php"); foreach($files as $file) { if (strpos(file_get_contents($file), $_POST["Search"])) { $FileName = str_replace("C:/inetpub/wwwroot/FortissimoMediaPHP/", "", $file); echo "<a href='" . $FileName . "'>$FileName</a&g
  2. Hi there,I'm very new to the world of graphic design and all that.Most tutorials I've come across deal with lower screen resolutions than my computer uses (as stated in the title), so I was wondering what the best practices are for dealing with screen sizes like I have? I've tried backgrounds in Photoshop 1 pixels x 1 pixels, but it's really small to see so I can't do any proper work with it. Would another option be to create a background for every screen resolution out there and use JavaScript to detect the user's screen size?ThanksDouglas
  3. Dug

    Image Snipping

    Hi there,This question probably has a very simple answer, but I'm not a graphic designer.Is it possible to snip off a small bit of an image, say a sandy beach, and make it into a website background that doesn't look blurred? Windows 7 has a snipping tool, which I've been using, but I just don't understand how to crop it.ThanksDouglas
  4. Hi there, Ok I'm rather stumped with this one so I'm having to ask. I have this code that superwraps the main body content into a div of a specific width, and I want to have a left column and a right column, and have it so that the background colour of the superwrap div goes behind the left column and right column as well. It's refusing to budge with everything I try. My code: /* CSS Document */html, body {height: auto;margin-top: 0;margin-bottom: 0;}body { background-image: url("../images/beach_water05.jpg"); color: #ffffff; letter-spacing: 3px; font-size:small; height: 100%;}p {padding-l
  5. Hi all,I've got this really bizarre issue with MySQL. I'm inserting values from a web form, and when I go into the database, all the columns have a value of 0. I don't think there's an issue with my script, since it opens the database and inserts the info as it should. Here's my SQL code that I used to create the table: CREATE TABLE `tblusers` ( `UserID` int(100) NOT NULL auto_increment, `FirstName` varchar(255) NOT NULL default '', `LastName` varchar(255) NOT NULL default '', `Email` varchar(255) NOT NULL default '', `Username` varchar(255) NOT NULL default '', `Password` varchar(25
  6. Dug

    Query was empty error

    Hi there,I'm doing some projects from the book Sams Teach Yourself PHP, MySQL and Apache, and I simply get this error: here is the SQL queries that I presume it refers to:// add to master_name table $add_master = "insert into master_name values ('', now(), now(), '$_POST[f_name]', '$_POST[l_name]')"; mysql_query($add_master) or die(mysql_error()); // get master_id for use with other tables $master_id = mysql_insert_id(); if (($_POST[address]) || ($_POST[city]) || ($_POST[state]) || ($_POST[zipcode])) { // something relevant, so add to address table $add_address = "insert into address
  7. Hi,Thanks for the reply. I've concluded that the code I originally had in this post won't do what I'm looking for... I've found the following code snippet: Imports System.Runtime.InteropServicesPublic Class MSNStatusMessage Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" ( _ ByVal hWnd1 As Integer, _ ByVal hWnd2 As Integer, _ ByVal lpsz1 As String, _ ByVal lpsz2 As String) _ As Integer Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" ( _ ByVal Hwnd As Integer, _ ByVal wMsg As Integer, _ ByVal wParam As Integer, _ ByVal lParam As Integer)
  8. Now I'm getting: in reference to:'Displays song info (MSN Messenger)Call SetMusicInfo(My.Settings.CurrentArtistPlaying, "Not Passed", My.Settings.CurrentSongPlaying)
  9. Hi there,Here is my entire script for the ASP.NET page: <script runat="server"> Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal Hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Integer, ByVal hWnd2 As Integer, ByVal lpsz1 As String, ByVal lpsz2 As String) As Integer Private Const W
  10. Hi there,I have this code that in theory should grab and display the currently playing song from Windows Live Messenger: Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal Hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Integer, ByVal hWnd2 As Integer, ByVal lpsz1 As String, ByVal lpsz
  11. Dug

    SQL Error

    Actually never mind, I've sorted it.
  12. Dug

    SQL Error

    Hi all,Ok, I've just got the usual error ....... I've just written a blog script for my site which this database uses, and while I was developing it locally, it worked a treat, but when I uploaded it to my remote server I got this error, and yet it inserts the data fine, and the table columns are exactly the same on both my local and remote server. The code for my insert statement is:strSQL = "INSERT INTO tblcomments (" & _ "BlogID, CommentName, Email, Comment, Added, IP) VALUES (" & _ "'" & Request.QueryString("BlogID") & "'," & _ "'" & tbName.Text & "'," &a
  13. Dug

    ASP Repeater Problem

    Hi all,Ok I've written a script for a blog for my site, but I'm wondering if there is a way in the Repeater body bit to display the Container.DataItem depending if there's a value in the database field? If that makes sense....Here is my code: <script runat="server"> Sub Page_Load(obj as object, e as eventargs) dim objConn as new OdbcConnection _ (ConfigurationSettings.AppSettings("LocalBlog")) dim objCmdA as new OdbcDataAdapter _ ("SELECT * FROM tblblog", objConn) dim objCmdB as new OdbcDataAdapter _ ("SELECT * FROM tblcomments", objConn) dim objCmdC as new OdbcDataAdapter
  14. Sorry I've taken ages to reply.............Ok, progress. I've decided to do my site in ASP.NET now. I've got the blog working - it's displaying the correct comments with the correct post, however it keeps on posting the blog again with the next comment, instead of having the comments all appearing under one blog. Here is my code: <script runat="server"> Sub Page_Load(obj as object, e as eventargs) dim objConn as new OdbcConnection _ (ConfigurationSettings.AppSettings("RemoteBlog")) dim objCmd as OdbcCommand = new OdbcCommand _ ("SELECT * FROM tblblog LEFT JOIN tblcomments ON
  15. Phew, thanks for that guys, that's eased my worries a bit!
×
×
  • Create New...