User Profile

Collapse

Profile Sidebar

Collapse
James
James
Last Activity: Jan 2 '12, 06:28 PM
Joined: Jun 7 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • James
    started a topic Problem with login script using php
    in PHP

    Problem with login script using php

    Hey guys. I seem to be having a problem with security on my login script.


    This is the code for my login page.

    Code:
    <?php
    	include('connect.php');
    
    	$username=$_POST['username'];
    	$password=$_POST['password'];
    
    	// protect from MySQL injection 
    	$username = stripslashes($username);
    	$password = stripslashes($password);
    	$username = mysql_real_escape_string($username);
    ...
    See more | Go to post

  • James
    started a topic redirect not working

    redirect not working

    Hi guys.

    I'm trying to redirect a page depending on the user's width dimension of the browser so I can display an html page created using jQuery mobile to be viewed on an iphone, and then the original page for the web


    Code:
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Style-Type" content="text/css"
    ...
    See more | Go to post

  • Thanks Marknut for that post. I was going to decide against providing the option to OK or cancel when a user wishes to delete a record, but then I saw your reply. Your post wasn't ignored at all and thanks for replying. I am now using your code.
    See more | Go to post
    Last edited by James; Dec 24 '11, 03:21 PM. Reason: to provide a clearer understanding

    Leave a comment:


  • James
    started a topic box shadow not working in safari

    box shadow not working in safari

    Hi guys.

    I'm using Safari 3.2.3 for Windows and for some reason I cannot get a shadow to display around my divs on the pages. Here is the code

    Code:
    #wrapper {
    -moz-box-shadow: 0px 0px 6px 2px #F1F1F1;
    -webkit-box-shadow: 0px 0px 6px 2px #F1F1F1;
    box-shadow: 0px 0px 6px 2px #F1F1F1;
    }
    The shadow appears within the latest versions of Opera, Google Chrome, I.E, and Mozilla...
    See more | Go to post

  • hmmmm good point Dormilich I didn't think of this. Do you know of a simple way to display a prompt should a user click a delete link by mistake?
    See more | Go to post

    Leave a comment:


  • how to display a prompt when user chooses to delete a record in php

    Hi guys.

    I have an admin section on my website and I would like to display a question asking the user if they would really like to delete a record once clicked. I am using PHP and MySQL to delete records from a database but if somebody accidentally clicks the delete link then it deletes straight away. Would I need to use a JavaScript prompt message?

    This is the delete link

    Code:
    echo '<td><a
    ...
    See more | Go to post

  • James
    started a topic error message displaying when field isn't empty
    in PHP

    error message displaying when field isn't empty

    Hi. For some reason when I choose to update details in a database, a field which displays the image name stored in a database is deemed to be empty when it isn't empty. Any feedback would be much appreciated.

    Code:
    <?php 
    				
    				if ($error == true)
    					{
    						echo '<div style="padding:5px 10px 5px 10px; margin-top:20px;  border:2px solid #FF0000; color:#FF0000; width:345px;">'.$error.'</div>';
    ...
    See more | Go to post

  • James
    replied to Error message not displaying
    in PHP
    Thanks very much zorgi! Hours of stressing has finally been solved! :D
    See more | Go to post

    Leave a comment:


  • James
    replied to Error message not displaying
    in PHP
    sorry my mistake.

    This is the full code:

    Code:
    <?php
    
    			 function form($price, $rooms, $address, $description, $photo)
    			 {
    				
    				if (isset($_POST['submit']))
    					{ 
    						if ($error != '')
    							{
    								echo '<div style="padding:5px 10px 5px 10px; margin-top:20px; border:2px solid #FF0000; color:#FF0000; width:315px;">'.$error.'</div>';
    ...
    See more | Go to post

    Leave a comment:


  • James
    started a topic Error message not displaying
    in PHP

    Error message not displaying

    Hi there. I seem to be having a problem with an if statement within the following PHP code. I have a form which a user can fill in, in order to add house details to a database such as price, description and image etc. This PHP script throws up no errors when it is run and is working perfectly fine. However, the if statement I have used to display an error message if the user doesn't fill in all the fields isn't working. When I submit a blank form...
    See more | Go to post

  • James
    started a topic Error in SQL syntax
    in PHP

    Error in SQL syntax

    Hi, I seem to be having a problem inserting data into a database

    Code:
    // check to make sure fields are entered
     if ($name == '' ||  $address1== '' || $address2 == '' || $town == '' || $county == '' || $postcode == '' || $info == '' || $price == '')
     {
     // generate error message
     $error = 'ERROR: Please fill in all required fields!';
     
     // if either field is blank, display the form again
     renderForm($name,
    ...
    See more | Go to post

  • James
    started a topic a:active not working

    a:active not working

    Hi, I seem to be having a problem getting a ink to show a certain colour when active. Below is my code for you to look at...

    Code:
    #navigation {
    	font-size:12px;
    	position:absolute;
    	bottom:10px;
    	left:583px;
    }
    
    #navigation a {
    	color:#FFFFFF;
    	text-decoration:none;
    	width:100px;
    }
    
    #navigation a:hover {
    	font-size:12px;
    	color:#15959B;
    ...
    See more | Go to post

  • James
    started a topic child element appearing above <ul> tags in a div

    child element appearing above <ul> tags in a div

    Hi,

    I seem to have a problem with the positioning of elements. I have a "content" div that has a min-height of 500px and I am inserting an image of 380px height into this div. I have set my "footer" div to relative positioning so no matter what elements are placed in the "content" div, the footer will immediately follow the "content" div. This works fine when I insert <p> tags, but for...
    See more | Go to post

  • James
    started a topic changing the 'from' address in an email in php mail
    in PHP

    changing the 'from' address in an email in php mail

    Hi guys!

    I'm new to PHP so I’m struggling a little. I am using the phpmail function in a contact form I’m creating and I would like to change the ‘from’ who I’m receiving emails from.

    At the moment I get an email from the web host company I am with telling me that somebody has filled in my contact form. So in my Hotmail inbox it says:

    “a1297385@srv32 .000webhost.com ” in the ‘from’ section....
    See more | Go to post

  • James
    replied to Using separate divs for a navigation
    Did you mean the comma after every #home? tried that and it didn't work; it ended up not displaying the image I wanted when hovering and clicking...
    See more | Go to post

    Leave a comment:


  • James
    started a topic Using separate divs for a navigation

    Using separate divs for a navigation

    Hi,

    Okay so basically I have a navigation bar that consists of 5 clickable div links which are:

    Home, About me, Portfolio, Experience and Contact

    I am using 5 separate divs with image backgrounds because the font I have used isn't available in css. I seem to have a problem with when it comes to the styling of the links.

    I have assigned;

    a:hover and a:active to each div and...
    See more | Go to post
    Last edited by James; Jun 17 '11, 04:19 PM. Reason: To make it clearer for people to understand

  • How to change the height of one div to use repeatedly within different HTML pages

    Hi there!

    Okay so basically what I’m trying to figure out is how to change the height of one div to use repeatedly within various pages of a website I’m creating.

    I have about 10 different web pages and all of them differ in height. The home page has images and text on and I’m using a div called "content" which is 700px in height and this is fine to show the relative content. But I have another page which...
    See more | Go to post
No activity results to display
Show More
Working...