Borzoi 24 Posting Whiz

What's the code you're using to try align it where you want?

Borzoi 24 Posting Whiz

Well done.

How much dirt is there in a 2 x 2 x 4 hole?

Measurements are in metres.

Borzoi 24 Posting Whiz

Nevermind that, I found your error.

Remove every instance you have of exit; .

From what I can see, that's on lines 29 and 36.

When exit; is called, it stops rendering all code after it which is why nothing is displayed.

Borzoi 24 Posting Whiz

Which is the reason I doubted it would fix it.

Here's an obvious question I should have already asked:

Does the server you're using support PHP?

Borzoi 24 Posting Whiz

You have 2 errors in your code before the bit that doesn't process. I doubt it will fix the problem but you probably want to fix them.

Line 12:

<div class="graph" style="margin-left: 0px; margin-right: 0px;" display="inline">

Should be:

<div class="graph" style="margin-left: 0px; margin-right: 0px; display: inline;">

Line 13:

<align="left">

This isn't needed as the default alignment is the left and there is no <align> tag.

Borzoi 24 Posting Whiz

Why would you not want to use %word% ? With your way, if you have something like "Harry Potter and the Chamber of Secrets" and the person searches for "Chamber of Secrets" then no result would be returned.

If you have code to ignore "The" every time, then if someone searches for "The Simpsons" nothing would be returned as you are ignoring "The" from the database.

Also, if I'm not mistaken, smantscheff's code will only replace "The " and not "the " and since small words such as "the", "a", "and" etc. are supposed to be in lowercase when in titles, it shouldn't replace those.

Borzoi 24 Posting Whiz

What is showing in the code on the loaded page? (View > Page Source)

Borzoi 24 Posting Whiz

Half Dollar (US)
Half Penny (UK, although it's nor produced any more)

Those are two that I can think of.

I'm surprised no-one has answered mine yet.

Borzoi 24 Posting Whiz

Now, I'm eating a double chocolate doughnut and drinking Relentless.

Borzoi 24 Posting Whiz

Post your riddles here!

Here's an easy one:

A bicycle takes exactly 40 minutes to travel a 40 minute journey. How long would it take a car that goes twice as fast?

Borzoi 24 Posting Whiz

Double chocolate doughnuts.

Borzoi 24 Posting Whiz

You should have an "other" option.

Borzoi 24 Posting Whiz

In that case, it's very simple.

In your database, you need a table with 4 columns: id , post_user , post_text , post_time id should be an int , auto-increment and your primary key post_user is the username of the user that made the post. Should be a varchar(25) . (25 characters should be enough). post_text is the post. It should be a text so that line breaks can be used. post_time would be the time of the post and what to sort by. Whenever inputting the time into the database, just use the now() function.

Make sure you use stripslashes() so that people can't use SQL injection.

When calling the data from the database, your query should look something like this:
(assume the table is called "Feed")

SELECT * FROM Feed ORDER BY post_time ASC

You would then go on to display the user, post, and post time in a table of some sort.

I used to have something like this on my site which I have since expanded upon to make it into a forum with topics and users.

Zagga commented: Well written post, easy to follow with examples. +1
Borzoi 24 Posting Whiz

What everyone else has said plus you need the first line of your table in a row. You've got the <th> but it's not within a <tr> and since it's the only one in the row, you need to use colspan="2" too.

Borzoi 24 Posting Whiz

Ah, that's where I've been going wrong. I had the .htaccess file in the folder with all the configurations. Thanks.

Borzoi 24 Posting Whiz

Do you want this to happen in real time like an instant messenger or more like a message board/forum?

Borzoi 24 Posting Whiz

I assume that you want to display the colon on the page instead of it being read as part of the code. In that case, use the HTML &#38;#58; to display it.

Borzoi 24 Posting Whiz

Use nav33n's method if it's a simple link and you don't mind the end user seeing the variable (and possibly changing it) but use $_GET instead of $_REQUEST.

Use catherine sea's example if it's a form you're using to get input from the user.

Borzoi 24 Posting Whiz

Set a cookie in the user's browser when they log in then on the admin page, check for that cookie.

Borzoi 24 Posting Whiz

Hello all,

How would I go about getting my site to redirect any visitor to http://site.com rather than http://www.site.com?

I have searched the forums here and have tried various coding people have provided but none of it seems to work. Could someone maybe post a step by step guide on how to do this including code, where to put the code and server settings to allow it?

Borzoi 24 Posting Whiz

There's nothing wrong with your HTML there and the CSS for the contactus class you have shouldn't affect it.

If there was any problem with your HTML or CSS, it could only be the link pointing to the wrong location but you said that the problem you're having is that it's not being clickable.

I've noticed that you're positioning the image as well as floating it to the side. Try just using one or the other.

Borzoi 24 Posting Whiz

I don't know why a simple image linking to another page wouldn't work in HTML. Could we see the code you were using when you tried the pure HTML with no ASP?

Borzoi 24 Posting Whiz

I don't see why you need to use asp to link to a page like you are. Correct me if I'm wrong but from what I can see, the image will always link to that ContactUs.aspx page and therefore you don't need any sort of scripting to get the link as it's static and not dynamic. I would recommend using an anchor with an href= in.

<a href="ContactUs.aspx"><img class="contactus" border="0" src="images/ContactUs_200.jpg" alt="Contact Us"/></a>

If ContactUs.aspx isn't in the same folder as the page the link is on, put the file path. use "../" for up a folder.

Borzoi 24 Posting Whiz

Due to the uselessness of the IT team in my place of work, I have written a small batch file for the people in my department to map a network folder to a drive letter since the network path is too long and Windows will not allow us to open any files in that folder or any of it's subfolders. I have the batch file on my memory stick since our e-mail system blocks batch files, reading them as malicious so I can't e-mail it to everyone. This is the only thing on my memory stick that I will need to open/run while at work so I was wondering:

Is it possible to make the autorun.inf only run when connected to a certain domain or workgroup?

Borzoi 24 Posting Whiz

Ah yes, thank you. That has solved the problem.

Borzoi 24 Posting Whiz

If you have PHP enabled on your web server/host then you could just use the php md5(); Example:

$md5info = md5($ThingToConvertToMD5);
Borzoi 24 Posting Whiz

Is there a way to have multiple conditions using some sort of "or" so that I don't have to nest so many if statements?

I currently have cells like this:

=IF(E2 = "District1","North",IF(E2 = "District2","North",IF(E2 = "District3","North",IF(E2 = "District4","North","Not North"))))

I have tried using OR in two ways and neither work.

=IF(E2 = "District1" OR E2 = "District2" OR E2 = "District3" OR E2 = "District4","North","Not North")

=IF(E2 = "District1" OR "District2" OR "District3" OR "District4","North","Not North")

Is there some kind of "or" conditional or do I have to keep with my long winded nested ifs?

EDIT: It turns out I have too many nested If statements for Excel to handle. It seems Excel only accepts 8 nested IF statements (despite the help saying that I can have up to 64).

Borzoi 24 Posting Whiz
$result = mysql_query("SELECT* FROM student WHERE $field = '$searchword'") or trigger_error('MySQL error: ' . mysql_error());

in this line you have used php variable($field)in mysql query. you can use only table field name.

Graphix provided a solution to that which allowed the use of a variable.

Borzoi 24 Posting Whiz

You will never learn if you just get other people to fix your errors, just like Graphix said. I can see the change that needs to be done to get the code to work and it's a very minor correction needed.

I will tell you what the problem is but I won't provide the solution.

What's happening is your column name is "StudentID" but your code is trying to match a variable to something in the non-existent column called "sid".

Borzoi 24 Posting Whiz

You can use rowspan.

<table>
  <tr>
    <td rowspan="2">1</td>
  </tr>
  <tr>
    <td>2</td>
    <td>3</td>
  </tr>
</table>

You would need colspan for that, not rowspan. You would use rowspan like this:

<table>
  <tr>
    <td rowspan="2">1</td>
    <td>2</td>
  </tr>
  <tr>
    <td>3</td>
  </tr>
</table>
Borzoi 24 Posting Whiz

Nevermind, I remembered.

It's a matter of dividing y by 1.20 I remembered that another way to write the original formula would be x * 1.20 = y so it's much easier to reverse engineer into y / 1.20 = x .

For different percentages you would change the .20 part to the percent. For example, for 4% you would use 1.04 and for 17.5% you would use 1.175 .

Borzoi 24 Posting Whiz

I'm having a brain fart today and can't figure out something.

I have the formula: x + 20% = y Which can be expanded to: x + ((x / 100) * 20) = y What I'm trying to do is find out what x is when I know what y is.

Here's a simple (and probably unneeded) example:

If y is 120 then x is 100 since 20% of 100 is 20 and 100 + 20 = 120 . x + 20% = 120 , x = 100 .

I have made myself a spreadsheet for reference so I can get the answers but I'm trying to remember how to reverse the formula. If anyone could help it would be appreciated and I'm sure any maths students may appreciate it too.

EDIT: The spreadsheet requires me to put in what x might be and it'll give me a range form the number I input and up by 400 rather than me putting in y to find out x meaning I need to scroll down until I find the answer.

Borzoi 24 Posting Whiz

I'm only guessing here but I have a feeling that the iPhone put back the device's clock an hour and then put the alarm time forward an hour.

I.e.: 7:00am becomes 6:00am but the alarm should still be 7:00am and go off at that time but for some reason becomes 8:00am.

It sounds to me that the problem that was in New Zealand was where the system clock went back an hour then the alarm clock was also set back an hour, meaning the alarm was set back 2 hours causing it to go off an hour early. It seems to me that the "fix" for this was to change the "-1" in the code to "+1" causing it to go off an hour late instead of being "0" since the alarm time shouldn't need to change.

Borzoi 24 Posting Whiz

Could you give us the section of code that calls the function?

Borzoi 24 Posting Whiz

In my opinion, the best way to make a site is one that doesn't require a set maximum width. I would make it so that if the user has a high resolution (for example 1920x1080) then the site would expand to fit so as to minimise empty space but for users with a low resolution or users that don't maximise their browser, it would go to a minimum width of about 900px (to accommodate the slight variation in display area between browsers).

Borzoi 24 Posting Whiz

You need to ecbo the table for it to works:

<?php
function show_table() {
   echo "<table border=\"1\" cellspacing=\"2\" cellpadding=\"2\" style=\"background-color:#33990f;border-width:2px;width:100%;\">
   <tr>
   <th><font face=\"Arial, Helvetica, sans-serif\";font color=\"#FFFAFA\">Organization Name</font></th>
   <th><font face=\"Arial, Helvetica, sans-serif\";font color=\"#FFFAFA\">ID</font></th>
   </tr>
   </table>";
}
?>

Make sure you escape any speech marks within the code.

Borzoi 24 Posting Whiz

It's possible that IE naturally adds a bit of padding. Try putting padding: 0px; into the css.

I work similarly to lordrt in the way that I develop my sites for FireFox and don't worry too much about other browsers but I always make sure it's workable. A few things may be mis-positioned but that won't usually matter and I put a "This site is best viewed using FireFox" message if they are using a browser which doesn't display it how I want to to.

Borzoi 24 Posting Whiz

Thank you chrishea, that has answered my question.

Borzoi 24 Posting Whiz

If I was to set a wildcard in my subdomain (*.example.com) to redirect to www.example.com, would that affect any pre-existing subdomains (for example, blog.example.com) or would it only redirect things I haven't set?

Borzoi 24 Posting Whiz

Thanks Doug but that doesn't help me. I'm not using any form of control panel or content management system. I'm going to mark this thread as solved since my original question was answered and I'll create a new thread for my second.

Borzoi 24 Posting Whiz

I would try it myself but my site is currently offline and I likely won't be able to get back online for quite a while.

Thanks for your help with my first question. Hopefully someone else can answer my second.

Borzoi 24 Posting Whiz

Then I would need a very long cable on my mouse and keyboard if I have one.

There will be no such thing as cables in 2020. Ways to charge batteries wirelessly are already in research and development. Could easily stick those "charging stations" into lampposts and at bus stops so that all you need to do is walk past close enough to charge your phone.

Borzoi 24 Posting Whiz

So if you do indeed remember correctly, if I was to remove the [P] flag then it would show www.example.com.

I have another query:

If I was to change my DNS settings so *.example.com would go to my site, would that affect any subdomains I have already set, such as blog.example.com or mail.example.com or would that only affect subdomains that haven't been declared, so to speak?

Borzoi 24 Posting Whiz

Hello everyone,

If I was to set my site to redirect any subdomain to the main page in the htaccess file like so:

RewriteCond %{HTTP_HOST} ^(.*).example.com 
RewriteCond %{HTTP_HOST} !^www.example.com [NC] 
RewriteRule ^(.*)$ http://www.example.com/ [P]

Would this mean that if I was to type in elephant.example.com it would redirect and show www.example.com in the address bar or would it stay showing elephant.example.com?

If it's the former, is there a way to make it so it stays displaying elephant.example.com so that I can redirect it to a folder or would it be better to make the index file of the site check the address of the site and use include to display the necessary page?

Borzoi 24 Posting Whiz

Instead of wrapping the whole site in a <div> tag, set the body to have a background colour in the CSS:

body
{
  background-color: #104e8b;
}

The reason why you're getting the white border is because you're wrapping it all in a <div> which naturally has a bit of padding all around.

Also, here's some errors with your code:

-The link to the stylesheet should be in the <head> tag.
-You're missing a <head> and <title> tag.
-You haven't closed your <form> tag
-You haven't closed any of your <option> tags
-You haven't closed your link to the stylesheet or <input> tag (end with /> instead of just >)

Borzoi 24 Posting Whiz

I just put my codes in and all of them are validating (except where I've accidentally put a semicolon instead of a colon after "top" which I am editing now). The colour has no error.

Borzoi 24 Posting Whiz

Consistent code and layout

Everyone lays out their code differently. There is technically no right or wrong way to lay it out as long as the syntax is correct but you should be consistent along the whole document. Here are a few ways I've seen people coding:

.class
{
  color: #03fcfd;
  position: absolute;
  top; 10px;
}
.class {
  color: red;
  position: absolute;
  top; 10px;
}
.class {color: rgb(88,43,127); position: absolute; top; 10px;}

Those are only a few examples. See how the colour is written differently in each along with how the code is laid out? While each one is correct, you should use the same way throughout.

Borzoi 24 Posting Whiz

You post in a forum topic entitled "You know you are old when..."

happygeek commented: :) +0
Borzoi 24 Posting Whiz

You have a <br> tag in your first <div class="slide" tag. Could that be the problem?

Borzoi 24 Posting Whiz

Just so you know, you aren't closing your form tag in the first page.

I don't believe you can POST the value of a button. It would probably be better to have a check box saying "include responsible?" before the "Submit" button.