Borzoi 24 Posting Whiz

Do you mean the mouse cursor or the text input cursor?

As far as I know, it's impossible to move the mouse cursor but you can get the text input cursor to move to a new input box.

Borzoi 24 Posting Whiz

Compare the source code on your localhost server and when accessing the page online to see if it's rendering it differently for some reason. You can narrow down where the error is then.

Is your localhost server a different machine than the one hosting your online site? If so, it's possible that the settings for the server are different and thus, render the PHP differently.

Borzoi 24 Posting Whiz

You've given us a localhost URL which would mean the page would need to be on our own computers for us to view it. You will need to give us the public URL for us to view your site.

Borzoi 24 Posting Whiz

By "role based access control" do you mean different user levels? For example on a forum you could have administrator, moderator, standard user etc.

Borzoi 24 Posting Whiz

Are you saying you're going to lie on your resume?

Borzoi 24 Posting Whiz

I prefer SQL because it's what I'm used to. I haven't used the others enough to compare them.

Borzoi 24 Posting Whiz

I will need to configure it to send e-mails as I intend to have some sort of "contact us" form on the site but I'm currently using Google Services to host my domain's e-mail which is working really well for me so I was planning on staying with that.

I will have a look into CentOS. Thanks for the suggestion.

Borzoi 24 Posting Whiz

If the page is only ever going to be accessed with localhost, you could just have the page open constantly and code it to refresh itself every 10 seconds.

Borzoi 24 Posting Whiz

Oct is short for Octal
Dec is short for Decimal

Borzoi 24 Posting Whiz

Spot on!

Borzoi 24 Posting Whiz

The joke:

An SQL query walks into a bar and sees two table, walks up to them and says "Can I join you?"

The riddle:

Halloween == Christmas - Why?

Borzoi 24 Posting Whiz

I would recommend that you have it so the entered e-mail address is the "reply-to" address in the e-mail like richieking suggests so that when you click reply, it'll automatically have that e-mail in the "To" box. This way the e-mail sent using the form is still sent using your domain so it shouldn't cause blacklisting.

Borzoi 24 Posting Whiz

I plan on making a web server for myself. Just a small site for myself containing my blog and a small infrequently updated webcomic, nothing huge and commercial and was wondering what is generally the best Linux to use for this. I have made web servers before using Windows XP and Ubuntu (can't remember which release, likely 7.something) so I have experience in making servers and I know how so I'm not asking how to set one up, just what operating system is generally the best to use.

I realise everyone will likely have a different opinion so hopefully we will have a friendly debate over the advantages and disadvantages of using each distro as a web server.

Borzoi 24 Posting Whiz

It shouldn't be a problem not having the "www" at the beginning. From the sounds of it, the DNS redirects http://www.example.com to http://example.com which is good practice.

Take any website that has their DNS configured correctly, for example daniweb, and you will often find that if you go to http://daniweb.com it will redirect to http://www.daniweb.com. All that's happening with you is that it's redirecting the other way round.

The reason why one redirects to the other is so that search engines detect them as the same site instead of 2 different sites with exact same content.

If you want to change it so that it redirects the other way round, you will need to change your DNS settings (unless it's something else causing the redirect).

Side note: Website that don't have their DNS configured correctly and require typing "www" at the beginning annoy me.

Borzoi 24 Posting Whiz

I've come across this problem before and the problem was that someone had plugged in a network cable for a completely different network into the switchbox so every computer was trying to grab information from 2 different networks and it was confusing itself. I see though that you've tried it while the computers have no network cable connected so that couldn't be the problem.

By the sounds of it, there's some sort of interference if it's happening to the machines whether they're connected to a network or not. Is there something in the problem building that isn't in the others?

Borzoi 24 Posting Whiz

You don't have to have the whole page written in PHP if it's saved as a .php file. You could have the whole page written in HTML if you wanted. Either way, the end user will never see the PHP code even if they try to view it as the browser will process the code and output the resulting HTML to the source file that they will see if they choose to "view source code".

Borzoi 24 Posting Whiz

One thing you could do instead of using cookies is set it so the page you go to has the variable in the URL.

Example (not a valid link, in case anyone tries): http://daniweb.com/PHP2.php?age=9&someotherthing=1

So the code in PHP1.php would look something like this:

<?php
  $age = 9;
  $someotherthing= 1;

  echo "<a href=\"http://daniweb.com/PHP2.php?age=$age&someotherthing=$someotherthing\">Link to PHP2</a>";
?>

This way you don't need a form for the end user to fill out and you could just use whatever formula you were previously using to set the variable. If you don't want the end user to be able to see the variable and it's value or be able to manually change it then this is not advisable because anyone could just go to the address bar and change the value of each variable this way.

Borzoi 24 Posting Whiz

Use the unlink() function.

Syntax is unlink('filename.ext'); Example:

<?php
  
  unlink('file.txt'); //Delete "file.txt" from the current folder.
  unlink('../file.txt'); //Delete "file.txt" from the parent folder.
  unlink('texts/file.txt'); //Delete "file.txt" from the "texts" folder.
  unlink('../texts/file.txt'); //Delete "file.txt" from the "texts" folder within the parent folder.

  $filepath = '../texts/file.txt';

  unlink($filepath); //Deletes the specified file in the "$filepath" variable

?>

I hope that helps. (I think I may have overdone it with the examples. :P)

Borzoi 24 Posting Whiz

I'm assuming the strings are variables. Here's a couple ways you could do it:

<?php
  $string1 = 'hello';
  $string2 = 'goodbye';

  echo $string1; //displays "hello"
  echo $string2; //displays "goodbye"
  echo $string1[3]; //displays "l"
  echo $string2[3]; //displays "d"

  /*The first character in a string is always 0 followed by 1, 2 etc until the end. In the above example, you can only grab one character from the string. If you wish to extract a smaller string of characters from the string, use the below example*/

  echo substr($string1, 1); //displays "ello"
  echo substr($string2, 1); //displays "oodbye"
  echo substr($string1, 1, 1); //displays "e"
  echo substr($string2, 1, 1); //displays "o"
  echo substr($string1, 1, 3); //displays "ell"
  echo substr($string2, 1, 3); //displays "ood"
  echo substr($string1, -3); //displays "llo"
  echo substr($string2, -3); //displays "bye"
  echo substr($string1, -3, 1); //displays "l"
  echo substr($string2, -3, 1); //displays "b"
  echo substr($string1, 1, -3); //displays "e"
  echo substr($string2, 1, -3); //displays "ood"
  echo substr($string1, -4, -3); //displays "he"
  echo substr($string2, -4, -3); //displays "od"

  /*The first number selects which character to start from and the second number says how many characters to display from the start. If the start is a negative value, it will count backwards from the end of the string. When doing this, the last character of the string is treated as -1 then the one before as -2 etc. If the length is negative then it will select the end character instead of the length of the string. If no length is specified then it will …
Borzoi 24 Posting Whiz

I thought I responded to this last night... I must have closed the browser before the page loaded.

All I mentioned was that I made an error and shouldn't have put the space before/after the wildcards since it will then search the database for those spaces but by the looks of it, you have realised my error.

Borzoi 24 Posting Whiz

You cannot add any own tags within html. you can add own tags only in XML.

That isn't what the topic creator was asking.

To change a button into an image:

<input type="image" src="image.jpg" alt="Submit button">

I am unsure if this will work for a browse button though. I got the code from http://www.webdevelopersnotes.com/tips/html/using_an_image_as_a_submit_button.php3

Borzoi 24 Posting Whiz

I think I see what is meant by the page jumps to the top. If you resize your browser so that you can scroll down on the link and scroll down slightly so that you're not at the top but still have the tab buttons in view, the page will jump to the top when any tab is clicked.

The reason for this is because each tab is calling an ID (#tab1, #tab2 etc) and whenever a link calls an id like that, it automatically scrolls to that part of the page, which in this case is the top of the page. To prevent it, you would need to find some way of replacing the IDs with something else.

Borzoi 24 Posting Whiz

Instead of having all the PHP in the head, you could add the if statement inline:

<?php 
	session_start();


if(isset($_SESSION['validUser']))
	{
	if ($_SESSION['validUser']!= "True") 
		die("You are not allowed here!!");
	} 
else
	die("You are not allowed here!");
	
if (isset($_POST['update'])) {

// Save the changes
	$currentrow = $_SESSION['currentrow'];

// (more php code not shown)
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Test</title>

</head>
<body >
	<form id="orderForm" method="post" >
		


	<?php
          if ($_SESSION['filter'] <> 'N')
          {
	    echo "<div id=\"tel1\" style=\"display:none\">Viewing all whose payment has NOT been confirmed.</div>";
	  }
          else
          {
	    echo "<div id=\"tel2\" style=\"display:none\">Viewing all who have been confirmed.</div>";
	  }
        ?>
		
		<fieldset>
		<legend>About You</legend>
	<div class="grid_3">										
		<input type="text"  size="30" maxlength="30" tabindex="1" name="fname" id="fname" />
    </div><!-- end .grid_3 -->
    
    		<div class="clearb"></div>
    		
  <div class="grid_2">
	<input type="text"  size="30" maxlength="30" tabindex="2"  name="lname" id="lname" />
    </div><!-- end .grid_2 -->

</form>

</body>
</html>
Borzoi 24 Posting Whiz

What is the code supposed to be doing?

If $admission_no[$y] is only supposed to output the value of $y then you can replace "$admission_no[$y]" with just "$y".

Without more of the code and not knowing what it's supposed to do, we can't help much. Could you please provide more of the code. Censor any passwords that may be in the code, obviously. Could you also use the BB Tag when providing PHP code please.[code=php] BB Tag when providing PHP code please.

Borzoi 24 Posting Whiz

I believe this should work:

$query = "SELECT * FROM classics WHERE author LIKE '% $author %' OR title LIKE '% $title %' OR year LIKE '% $year %' OR isbn LIKE '% $isbn %'";

The percent symbols are wildcards so if "$author" was set to "Mark" then it should return anything with "Mark" under the author column in your database whether that be Mark Twain, Graham Marks. or anyone else with "Mark" in their name.

If the LIKE qualifier doesn't work then try with your original way but still using the wildcards.

Borzoi 24 Posting Whiz

Thank you but I no longer need it. I should have closed the thread so I apologise.

Borzoi 24 Posting Whiz

The only image editor I have access to at work is Paint. I have tried the print screen-paste-crop method but the resolution on my computer is too small to get a decent size image using that method.

Borzoi 24 Posting Whiz

Thanks Maverike. That would be helpful but unfortunately I don't have photoshop on my work computer. I've filed a second complaint with HR and found out that this isn't the first time they've taken ages to update things that are needed. I was told that they had complaints similar to mine about IT from 4 different departments.

Borzoi 24 Posting Whiz

As far as I know, there is no software that will design the page for you but there is software, such as Dreamweaver and FrontPage, that will provide you with what's known as a WYSIWYG (What You See Is What You Get) which will allow you to make the site without having to modify the actual code which is handy if you have no website coding knowledge.

One problem with using WYSIWYGs is that they tend to add extra bits of code that isn't needed.

Borzoi 24 Posting Whiz

I need to go see HR today so I'm going to file a complaint while I'm there so I know that they've received it.

Borzoi 24 Posting Whiz

I apologise for bringing this back up but I thought that some of you may like to know that it's been 2 weeks now and they still haven't updated the software I need. The page I need the images for was supposed to have been live last week and because it's not, the whole site is behind schedule.

This is ridiculous. They have a full team of people yet can't find time to click "update" while logged in as an admin. I've seen companies with just one IT guy who was swamped with work but still could get the small and menial things that wouldn't even take 5 minutes done as soon as they were requested.

Borzoi 24 Posting Whiz

USB ports are blocked for all non-admins by default, which I think is the right thing to do because it means there's no chance of people taking confidential files home. I have no need for the USB ports anyway so if I requested access to them, I wouldn't be granted the permissions.

I'm in the office now and I've been calling them every 30 minutes for 2 hours now and I'm getting the same response every time of "Someone will be up in a few minutes." I've already filed an internal complaint to Human Resources so that should be investigated soon as complaints are always top priority.

Borzoi 24 Posting Whiz

I think I will. It wouldn't be so bad if I could just use another computer to save the necessary PDF files into images but the way they have the network set up means that you need to be "profiled" to that computer and until that's done, you can't access network drives or the internet.

I don't understand why they can't be like every other company and have it so you can log onto any computer on the network normally.

Borzoi 24 Posting Whiz

You're right. I'm not allowed to download any program without first passing it through IT. I can't find any solutions that don't require downloading anything so when I get to work tomorrow, I'll keep calling them every 20 minutes or so until they do it. Three days to click "update" on one computer is ridiculous.

Borzoi 24 Posting Whiz

I have been waiting for three days now for someone in the IT department where I work to update Acrobat so that I can use it. I don't know why they're taking so long because all they need to do is log in as an administrator then click "update" on Adobe Air. It could easily be done through remote access and they're only one floor down.

All I need Acrobat for is to save a PDF into an image but without those images, I can't update one of the pages on the site and that particular page is an important one which should have been updated last week.

Anyway, I was wondering if anyone knew of another way to convert a PFD to an image that doesn't involve printing it then using a scanner to scan it in or downloading software.

Any help will be appreciated and apologies for the mini-rant.

Borzoi 24 Posting Whiz

I'm currently at work and updating some pages on our website so they work on both the current and new site. I am trying to view the changes I've done to the current page I'm working on but IE8 won't hard refresh and display my changes on the new site. I have tried deleting all temporary files (including cache, which I thought would remedy it) but it still won't display my changes.

I can view the changes on the old site and I have checked the source from the loaded page to make sure it had my modifications on both the new and old site. The changes are definitely there on the old site but not the new one. I have even added an extra paragraph so that it's obvious when it's displaying the changes.

I would try viewing the page in another browser but unfortunately, IT won't allow anything other than IE8 to be used.

Does anyone have any suggestions as to what I could do to try and force a hard refresh?

Borzoi 24 Posting Whiz

Have you called their tech support? If you have an account with them their tech support is free. I can't make out what the problem is from that e-mail you got sent so I unfortunately can't help.

Not really useful information for you, but I live in the same city Fasthosts is located and work just down the road from them.

Borzoi 24 Posting Whiz

Is there any way of making an e-mail form using ASP/ASPX?

I am limited in what I can do since I'm not a root administrator on the website this is for. The site uses Contensis as it's content management system so if there is some way of doing it via that without editing the source code that would be appreciated. I have tried the "Contact List Subscriber" option under "E-mail management" but I'm getting a "No connection could be made because the target computer actively refused it" message. I can't contact the administrator of the website until next week so I am unable to ask him how to do it.

What I want this form to do is just send details from the form to a specific e-mail address. The current system here requires people to either phone or e-mail the call centre and ask to be put on the waiting list and then the people in the call centre puts it onto the system which is quite inefficient.

If you need more details, just ask.

Borzoi 24 Posting Whiz

Try putting "./" at the beginning which points to current folder so instead of just "config.php" put "./config.php" and see if that works.

Borzoi 24 Posting Whiz

I am looking to create a digital questionnaire which isn't web based. I need it to be a word document or PDF file (or something similar) that anyone could download to their computer and fill in on their computer (or if they choose to, print it out then fill it out by hand).

Does anyone know of any software (preferably free) which would allow me to do this? Or if MS Word has the necessary functions to achieve this, please let me know.

Thanks in advance.

-Andy

Borzoi 24 Posting Whiz

I would have though if it was the port then anything I plug into it would run at 1.1 speends.

Borzoi 24 Posting Whiz

They're all set to 2.0 and any other USB device runs at full speed in any of the ports.

Borzoi 24 Posting Whiz

I'm not sure how but I'm able to access the contents of the external hard drive now. I'm not sure what I did or if it will be permanently fixed so I'm currently backing up all the important things that I haven't already got another copy of.

Afterwards, I'm going to do more tests to determine the cause and solution.

It seems to be running smoothly right now, the only thing wrong is that Windows is detecting that it's plugged into a USB 1.1 port even though I know it's a USB 2.0 port since I don't have any USB 1.1 ports on my computer. Windows also gave me a message when I plugged it in saying something along the lines of "Your new hardware couldn't be installed and may not function correctly."

I suspect that my motherboard may be going. I have had the machine since 2006 and I haven't upgraded it since I got it.

Borzoi 24 Posting Whiz

That's a good point; I did say that. Looks like more testing is needed.

Borzoi 24 Posting Whiz

I think I've found the problem. It seems to be the usb port of the external hard drive. When I hold the cable in, the hard drive doesn't disconnect. Seems to me that it's own vibrating is causing the disconnection.

Borzoi 24 Posting Whiz

No. The Windows machine is a desktop. The netbook is what I'm using to post these messages, which is running Fedora Core 8.

Borzoi 24 Posting Whiz

Yes, it shows up, it's just that whenever I try to access it I get a "could not mount" error.

I have just found out that my netbook is failing to mount all USB drives not just external hard drives so I'm going to try fixing that then try the external hard drive in it again.

Borzoi 24 Posting Whiz

All my others are linux so I'll need to wait and see if a friend will let me use their's.

Borzoi 24 Posting Whiz

The hard drive only uses 1 USB connector but has it's own power supply. I've tried in all the USB ports in my computer. When I get the chance, I'll check for dust.

Borzoi 24 Posting Whiz

The drive won't stay connected long enough for me to run it.