Borzoi 24 Posting Whiz

For inline text, you should use <span> instead of <div> . They are pretty much the same except <div> is naturally a block, with a line break before and after whereas <span> is inline with no line breaks. Try using a <span> and see if that works.

Borzoi 24 Posting Whiz

Even if you have the font, anyone viewing your site will need to have the font installed on their computer to be able to view it.

To use the font though, find out what it's displayed as (in Word for example) then in the CSS you would put font-family: font name;

Borzoi 24 Posting Whiz

What browser are you using? I've tested your code and the text will only glow in IE and not in FireFox.

Borzoi 24 Posting Whiz

That doesn't answer the question, that is just an analysis of the scenario.

Borzoi 24 Posting Whiz

You're closing the style when you call "red" which is why it's not rendering properly. All you need to do is remove the speech marks around "red" to fix it.

I'm not sure why you're doing it in a table though and you should be using css to centre the text and not use the deprecated <center> tag. Just add style="text-align: center;" within any <p> tags or in the case of tables, in the <td> tag. Tags should also be in lowercase.

Borzoi 24 Posting Whiz

I think your error is with your date variables:

$datef = date("Y-m-d",mktime(0, 0, 0, $_GET['year'], $_GET['month'], $_GET['day']));
$datel = date("Y-m-d",mktime(0, 0, 0, $_GET['year1'], $_GET['month1'], $_GET['day1']));

Are you getting any error messages or is it just not grabbing anything from the database? I've just made a guess at what could be wrong since I don't know if you're getting any type of error message.

Borzoi 24 Posting Whiz

There is a good tutorial for this on the w3schools website. Here's the link:

http://www.w3schools.com/css/css_image_gallery.asp

Borzoi 24 Posting Whiz

is this issue with image extension?

If the file extension is .jpg and your link ends with .jpg then it shouldn't be a problem. You could always try putting it in lower case although it shouldn't be case sensitive.

Borzoi 24 Posting Whiz

Is that filepath correct? It's pointing to the folder "App_Data" which it's assuming is in the same folder as the file. It seems to me that the filepath may be wrong.

Borzoi 24 Posting Whiz

You're adding the same value over and over again $row['Team'] Assuming each team has their own names (Team1, Team2, Team3 etc) then you could try this:

$div_GP=$ttl_GP[$row['Team1']]+$ttl_GP[$row['Team2']]+$ttl_GP[$row['Team3']]+$ttl_GP[$row['Team4']];

All I've done is add numbers to each.

Borzoi 24 Posting Whiz

if i watch a video i cant see it normal,if i play a game it take wery wery long time...etc...a i forget,i also use iobit securiti 360....

If it's just the graphics, videos not playing right and games working slowly, it might be a problem with the graphics card and not the speed of the computer. Do other programs/files take a while to load?

Borzoi 24 Posting Whiz

If you want the default colour of all text on the page changed, put it in the body section instead of a class:

body
{
  color: #hexval;
}

Replace hexval with the hexadecimal value of the colour you want.

Borzoi 24 Posting Whiz

What does the source show for where the image is? (When clicking view source on the loaded web page). It looks like it's trying to load the image but can't find it.

Borzoi 24 Posting Whiz

Could you provide us with the part of code which is supposedly having the problem please? We will be able to help a lot more if you could. Censor any passwords within the code and anything else that you don't want us seeing.

Borzoi 24 Posting Whiz

You will need to put that into every page you want the image displayed.

Borzoi 24 Posting Whiz

One way is to have something in the database stating their user level (user, admin, moderator etc) then write a simple query to check that and display only the options available to them.

Borzoi 24 Posting Whiz

If there's no code to put the image on the page then it won't show up.

Borzoi 24 Posting Whiz

You've said you have an error but you haven't stated what the problem is. Could you also please wrap your code in code-tags.

Borzoi 24 Posting Whiz

Is the filepath to the image file correct?

Could you provide us with an extract of the code which isn't working?

Borzoi 24 Posting Whiz

I'm almost 100% certain that my current hard drive is SATA but I will check when I get around to building my new computer.

My plan was to build the new computer, install everything I need/want on it then put in the old hard drive to get everything from.

Borzoi 24 Posting Whiz

That doesn't really answer my question.

Borzoi 24 Posting Whiz

The riddle stated that the man saw a rabbit, it didn't tell us that it was. It's possible that the moonlight and shadows, along with his hunger made him think he saw a rabbit when it was actually something else. I did think it might be his family somehow but the statement said "if you don't shoot me, your family will die" so that wouldn't work.

Maybe what the rabbit said needs to be reversed? Instead of "If you shoot me, you will die but if you don't shoot me, your family will die" replace it with "If you shoot me, your family will live and if you don't shoot me, you will live."

Maybe it doesn't mean physical death and instead means the metaphorical death that people have inside? If he shoots the rabbit, he feels sorry for it and dies a little inside but if he doesn't shoot it, he goes home empty handed and his family die a little inside because the man came back with nothing.

I don't think these are right but they're the only things I can think of.

Borzoi 24 Posting Whiz

I am planning on getting a new computer soon with a 64bit version of Windows 7 Home Premium. The whole computer will be custom built by myself and I will be getting each part separately. What I want to know is this:

If I put my current computer's hard drive, which has XP (Professional, 32bit) on, as a secondary hard drive/slave drive, will it cause any issues with the new computer?

The reason I want to do this is to save me having to transfer all the data across. I don't mind if it will mean I can't boot into XP from the drive, all I want are the files on it. Images, videos, etc. I know that most of the programs will not run as they place registry entries and they will be missing and those programs will be re-installed properly.

Borzoi 24 Posting Whiz

All you need to do is update the field.

Assuming your stock levels are labelled "Stock" in the database and the items are labelled "item":

<?php
  
  /*After obtaining the stock level from the database and putting it into the variable $stocklevel and placing the amount just bought into the variable $bought.*/
  $newstock = stocklevel - $bought;

  /*Update the database with the new stock level, assuming the item just bought has been placed in the $itembought variable.*/
  mysql_query("UPDATE tablename SET Stock = '$newstock' WHERE item = '$itembought'");
?>
Borzoi 24 Posting Whiz

According to the properties of the page, it's written in plain text and not HTML. Make sure that the file extension is a valid html extension such as .html or .php.

What is the current file extension?

Borzoi 24 Posting Whiz

In that case, you would need to load everything from the database to begin with but not display it anywhere then use javascript to check the currently selected value from the drop down list and only display the relevant entries.

w3schools.com has a few good tutorials which could probably help you do this.

Borzoi 24 Posting Whiz

That was an error on my part, sorry. It's not liking that there are multiple lines of document.write so that will need to be modified.

Try this:

<script language="javascript">
if (location.href.indexOf("www.google.com") == -1)
{
  document.write("<div id=\"footer\">You are using the " , finalDisplay , " version of this application</b> </div>";
}
</script>
Borzoi 24 Posting Whiz

You would have the drop down box as a form with a "submit" button which would redirect to the page with this query on. You would then use $_POST to get the value of that dropdown box.

Form page:

<!--Replace results.php with your results page-->
<form action="results.php" method="post"> 
  <select name="dropdown">
    <option value="5">6</option>
    <option value="6">7</option>
    <option value="7">8</option>
    <option value="8">9</option>
    <option value="9">10</option>
    <option value="10">11</option>
  </select><br />
  <input type="submit" value="submit" />
</form>

Results page:

<?php
  $a = $_POST['dropdown'};

  $sql = "SELECT amount FROM payment WHERE id = '$a'";
  $result = mysql_query($sql);
  $row = mysql_fetch_array($result);
  $amount = $row['amount'];
?>
Borzoi 24 Posting Whiz

If I'm not mistaken, Visual C++ isn't free but thank you for the suggestion.

I will have a look into your other suggestions when I can.

Borzoi 24 Posting Whiz

I haven't done any C++ programming for quite a while now and the last compiler I used was Dev C++ (not sure which version/release but likely an old one). I want to start programming in C++ again but I'm an unaware of which free compiler would be the best to use. Any suggestions are welcome.

My main programming platform will be Windows and most programs I make will be intended to just run on Windows but I also use Linux and wouldn't mind a Linux C++ compiler so any suggestions for that will also be appreciated.

Thanks in advance.

Borzoi 24 Posting Whiz

You could use an if statement to check the URL. I assume your live version will have www. at the beginning. If not, replace it to whatever the start of the URL for the live site is.

<script language="javascript">
if (location.href.indexOf("www.google.com") == -1)
{
  document.write("<div id=\"footer\">You are using the ");
  document.writeln(finalDisplay);
  document.write(" version of this application</b> </div>";
}
</script>

This will execute the code if the page is NOT www.google.com so it should only show up on non-live pages. If you want the code to execute when it is www.google.com, change the "==" to "!="

Borzoi 24 Posting Whiz

Using just height: 80% will fix it at that permanently, stretching smaller images.

I've just tried using max-height and it doesn't seem to work in either FireFox or IE. The only solution I could find that wouldn't stretch smaller images is wrapping the <img> in a <div> and setting height to 100% in that;

<div style="height:100%;">
  <img class="Display" src="source/image/path/file.jpg" />
</div>

Obviously, you could put a class in the stylesheet instead of declaring it in the <div> tag.

I think the reason for this is because the height of a page isn't set to the height of the display area in the window by default, like the width is. By setting the height in a <div> to 100%, you're setting the height of that element to 100% of the display area in the window.

Borzoi 24 Posting Whiz

What you could do is have multiple header files to include with the different meta tags you require and include the necessary one depending on the page you're loading.

For example: On index.php?id=about you could include the header file headabout.php and on index.php?id=contact you could include the headerfile headcontact.php using the $id variable as it's set in the URL.

<head>
  <?php
    include "head$id.php";
  ?>
</head>
Borzoi 24 Posting Whiz

Remember to mark the thread as solved if you've found a solution.

Borzoi 24 Posting Whiz
$query ="select Emp_Id,First_Name,Last_Name,Gender,Mobile_No,Email_Id,Blood_Group from Employee where";
      
      if($empid!='')
      {
          $query1=$query . " Emp_Id like '".$empid."%'";
         // echo $query1;

          if($empname!='')
          {
              $query1=$query . " and First_Name like '%".$empname."%'";
          }
      
          if($empname!='')
          {
              $query1=$query . " and Last_Name like '%".$empname."%'";
          }
      
          if($mobileno!='')
          {
              $query1=$query . " and Mobile_No like '%".$mobileno."%'";
              // echo $query1;
          }
      
          if($bloodgroup!='')
          {
              $query1=$query . " and Blood_Group like '".$bloodgroup."%'";
          }
      }
      else if($empname!='')
      {
          $query1=$query . " First_Name like '%".$empname."%'";

          if($empname!='')
          {
              $query1=$query . " and Last_Name like '%".$empname."%'";
          }
      
          if($mobileno!='')
          {
              $query1=$query . " and Mobile_No like '%".$mobileno."%'";
              // echo $query1;
          }
      
          if($bloodgroup!='')
          {
              $query1=$query . " and Blood_Group like '".$bloodgroup."%'";
          }
      }
      else if($empname!='')
      {
          $query1=$query . " Last_Name like '%".$empname."%'";

          if($mobileno!='')
          {
              $query1=$query . " and Mobile_No like '%".$mobileno."%'";
              // echo $query1;
          }
      
          if($bloodgroup!='')
          {
              $query1=$query . " and Blood_Group like '".$bloodgroup."%'";
          }
      }
      else if($mobileno!='')
      {
          $query1=$query . " Mobile_No like '%".$mobileno."%'";
         // echo $query1;

          if($bloodgroup!='')
          {
              $query1=$query . " and Blood_Group like '".$bloodgroup."%'";
          }
      }
      else if($bloodgroup!='')
      {
          $query1=$query . " Blood_Group like '".$bloodgroup."%'";
      }
      
      
      $query2= mysql_query($query1);
      
      mysql_error();
      $num=mysql_num_rows($query2);
      echo $num;

I know it's a bit long winded but it will eliminated any erroneous "and" at the end or beginning.

Borzoi 24 Posting Whiz

You haven't closed either of those if statements.

<?php
if($resultNews = $c_ss_news->GetNewsById())
{
  if($rowNews = @mysql_fetch_array($resultNews))
  {
    $pageTitle = $rowNews["NEW_Headline"];
  }
}
?>
Borzoi 24 Posting Whiz

I understand what you mean now.

If $rowNews["NEW_Headline"] is being set in one of the included files before the <title> tag, you could just use that or set $pageTitle using $pageTitle = $rowNews["NEW_Headline"]

Borzoi 24 Posting Whiz

Like ardav said, you need to set $pageTitle before it can be used. Is it being set in one of the included files before the <title> tag?

Borzoi 24 Posting Whiz

What are your expected and actual results?

Borzoi 24 Posting Whiz

Could it be that all your never-before-used memory blocks have the same value? It's default "empty" value so to speak.

Try it with different type of variables like a char and see if all the chars also have the same value.

Borzoi 24 Posting Whiz

When you click "view source" on the outputted page, what does <img src="images/<?php echo $thumbnail ?>" /> display?

If $thumbnail doesn't have a file extension then it's going to be just linking to a folder as the image source.

Borzoi 24 Posting Whiz

Thank you.

Borzoi 24 Posting Whiz

You're very welcome.

Borzoi 24 Posting Whiz

With your update, it's updating all the entries as you haven't specified a WHERE in it.

I would suggest changing the form on editme.php to this:

while($row = mysql_fetch_array($result))
  {
  echo "Record <br />";
  echo "Studen id: <input type='text' name='s' disabled='disabled' value="  . $row['Studid'] . ">"  . "<br />";
  echo "First Name: <input type='text' name='e' value="  . $row['Fname'] . ">"  .  "<br />";
  echo "Last Name: <input type='text' name='f' value="  . $row['Lname'] . ">" .  "<br />";
  };

This way you could use it to make sure you only modify the right row in editme1.php like this:

<?php
$a=$_POST['e'];
$b=$_POST['f'];
$c=$_POST['s'];
 
$con = mysql_connect("localhost","----","----");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
 
mysql_select_db("----", $con);
 
$query="UPDATE Sample SET Fname='$a', Lname='$b' WHERE Studid='$c'";
mysql_query($query) or die('mysql error ' . mysql_error() . ' in query : ' . $query);
 
echo "Successful";
 
mysql_close($con);
?>

That should stop it completely emptying the database. Let me know if it still causes the line you're trying to edit to be empty.

Borzoi 24 Posting Whiz

I am planning to start up a new business soon and part of it is selling online. I was planning on using PayPal in the early days to handle the payments until we can afford good enough security so that we can hold data such as credit card information ourselves. My question is this:

When using PayPal (or other third party checkouts such as Google Checkout) as a checkout system, will my site need an SSL certificate and an https connection?

Borzoi 24 Posting Whiz

I came across a siuation tat i need to store multiline inputs with paragraps. and i need to insert ( ' ) symbol in sql db thro php. I'm a newbie canany one help??

I used multiline textbox for input. It successfull get inserted to db but when i qurey back, it comes as a single line.

You should start your own topic to get the help you need.

Borzoi 24 Posting Whiz

I'm not sure if you can use breadcrumbs with the way that you've got your site set up as the only way I've worked with them is that each crumb is a folder (i.e.: crumb1 >> crumb2 >> crumb3 >> CurrentPage). I could be wrong though.

I'm assuming the menu is part of the index page rather than in the included pages each time so you could add a simple if statement to determine what page you're on to keep it the same colour:

<li class="menu" <?php if($page == "contact"){echo "style=\"background-color: #ff00cd;\"";}?>><a href="index.php?page=contact">Contact</a></li>

What this does is add an extra style tag into the <li> if it's the current page which will overwrite the background colour of whatever the .menu class in the css file says to do.

I'm not sure how you have your menu coded so adjust as needed.

Borzoi 24 Posting Whiz

You put the wrong type of single quotes on the line:

$sql="UPDATE `Sample` SET `Fname`='$a',`Lname`='$b'";

Here's the correction:

$sql="UPDATE 'Sample' SET 'Fname'='$a','Lname'='$b'";

You shouldn't need the quotes though so this should work:

$sql="UPDATE Sample SET Fname='$a',Lname='$b'";

You cannot update the database if there is no information in the database in the first place though!

If you're just trying to insert the data into the table, this is what you should be using:

$sql = "INSERT INTO Sample (Fname, Lname) VALUES ('$a', '$b')"
Borzoi 24 Posting Whiz

%22 is speech marks (") so it's possible that your WYSIWYG is adding them at the end of the filepath. Check the source code in the WYSIWYG to see if it is there, if not, try adding a backslash (\) at the end of the filepath which should escape anything such as the speech marks after the filepath. If the %22 is still there then that likely means there's a problem with the WYSIWYG trying to correct your code, even though it's correct.

Borzoi 24 Posting Whiz

You will likely find that most people now have a minimum resolution of 1024x768 but I would suggest making the site work on 800x600.