MDGM 22 Posting Whiz in Training

What I have done so far is added a couple of simple lines in.

Old Code:

assigntarget:function(){
	var rexcludedomains=new RegExp(this.excludedomains.join("|"), "i")
	var all_links=document.getElementsByTagName("a")
	if (this.mode=="auto" || (this.mode=="manual" && this.togglebox.checked)){
		for (var i=0; i<=(all_links.length-1); i++){
			if (all_links[i].hostname.search(rexcludedomains)==-1 && all_links[i].href.indexOf("http:")!=-1)
				all_links[i].target=ddwindowlinks.linktarget

New Code:

assigntarget:function(){
	var rexcludedomains=new RegExp(this.excludedomains.join("|"), "i")
	var all_links=document.getElementsByTagName("a")
	if (this.mode=="auto" || (this.mode=="manual" && this.togglebox.checked)){
		for (var i=0; i<=(all_links.length-1); i++){
			if (all_links[i].hostname.search(rexcludedomains)==-1 && all_links[i].href.indexOf("http:")!=-1)
				all_links[i].target=ddwindowlinks.linktarget
				var origionalhref = all_links[i].href;
				all_links[i].href='http://www.economizerz.com/externallinks/?url='.origionalhref

So by that I have told it to change the href on the link to
http://www.economizerz.com/externallinks/?url=
but the problem im having is adding the origional href onto the end. I thought that by setting a variable (origionalhref) to the value of the origional link's href it might work but it comes up with undefined so im guessing this syntax is wrong:
var origionalhref = all_links.href;

Any ideas how to fix it? Im basically storing the origional value of the link's href in a variable before changing it, and calling it later in the script when i want to change that link's href.

MDGM 22 Posting Whiz in Training

Ahh okay that makes sense. The only problem is that the link will expect that the target frame is on the same page, however I need to edit the url of the link and change it like this:

origional:
http://www.google.com

changed to:
http://www.economizerz.com/externallinks/?url=http://www.google.com

So if i change the url I dont need to change the frame because in my externallinks index page the bottom frame takes it's source using PHP's get function out of the address bar so the bottom frame will load the value of url (http://www.google.com)

MDGM 22 Posting Whiz in Training

Hi all,

I found a script on dynamic drive that makes all links linking to a page that is on another website open in a _blank window. (http://www.dynamicdrive.com/dynamicindex8/newwindow2.htm)

I have just finished creating a page which has 2 frames:

1) At the top with my logo and menu on it
2) At the bottom which gets it's content using PHP and grabbing the url (index.php?url=blah.com) from the address bar.

My question:

How would I edit the script i found on dynamic drive (http://www.dynamicdrive.com/dynamicindex8/newwindow2.htm) in order to find links that link to an external website, and edit the links href to http://www.mysite.com/externallinks/?url=*origional url*

Thanks all :)

p.s. im not great with javascript :P

MDGM 22 Posting Whiz in Training

I have tried all of those.

my cookie prints out because in the screen shot of the page it shows the username saved as the value of the cookie so it prints out and has been set properly.

im using firefox and cookies normally work

sessions dont work either although i only tried breifly :/

MDGM 22 Posting Whiz in Training

Still not working. comes up with the same result - go on the link below to see screenshot.

http://economizerz.com/other/daniweb/images/ecocookies.bmp

"not logged in" under the add to basket button is put there because of an isset statement checking for the cookie

"already logged in" is put there because of the same isset statement checking for the same cookie

MDGM 22 Posting Whiz in Training

Hi all,

Im editting a whois script so when it returns the details of the whois search it returns one positive answer if the "loggedin" cookie is found, and another positive answer if it is not, and a negative one if the domain is taken. The whois script works fine but checking for the cookie does not.

It goes like this:

1) home page
www.example.com/index.php ---> (submit whois form (form action is step 2))

2) home page whois form action
www.example.com/whois/whois.php
require_once("AjaxWhois.php");
$whois = new AjaxWhois();
$domainName = (isset($_POST)) ? $_POST : '';
$whois->processAjaxWhois();

3) required file within whois form action
www.example.com/whois/ajaxwhois.php

//whois processing has already been done. 
//if domain is available....
if ($this->checkDomain($domain,$server,$findText))
{
//check for cookie
	if (isset($_COOKIE['loggedin']))
		{
//and echo 'logged in message'
   	   echo "domain available. You are logged in.";
		}
else 
		{
//else echo 'not logged in message'
			echo "domain available. You are not logged in.";
		}
}
//unless domain is not available, echo 'not available message'
   else {echo "Domain not available.";}
}

The script always returns the 'you are not logged in' message even through the cookie is definately written. any ideas why?

MDGM 22 Posting Whiz in Training

Thanks for the help everybody,

Iv just gone for the simplist one - base64. i actually looked into this before posting this thread but for some reason dismissed it because i thought it wouldn't work! :P

The other methods at the moment are a bit out of my skill level but they will be useful for other people looking on this forum or possibly myself later in my php career :)

Thanks for the help,

Max

MDGM 22 Posting Whiz in Training

Hi all,

I have a registration form on my website which once filled in, it sends an email to the user with a link to "verify their email address". This link holds all of the information entered by the user in the form and looks something like this:

http://www.example.com/confirm.php?firstname=john&lastname=smith

When the user clicks the link the php script on confirm.php gets the values from the address bar and enters them into the database.

however the address bar also holds passwords and usernames etc and so it would be very easy for somebody to steal the user's username and password, so for this reason i need to encrypt the values of the field data held in the address bar. They can be decrypted on the confirm.php page if needed.

Thanks for the help,

Max

MDGM 22 Posting Whiz in Training

dont worry I have fixed that now but it is still not working. (http://economizerz.com/index.php)
this is the code for the .co.uk suffix i am using

$this->serverList[9]['top']      = 'co.uk';
	$this->serverList[9]['server']   = 'whois.nic.uk';
	$this->serverList[9]['response'] = 'No match for';
	$this->serverList[9]['check']    = false;

(sorry for the 2 previous posts - the delete post button is not there! lol)

MDGM 22 Posting Whiz in Training

(if the script is meant to be:

foreach($_POST as $key=>$value)
{
	$_POST[str_replace("_", ".", $key)] = $value;
}
print_r($_POST);
echo "<br />" . $_POST['.co.uk'];

i have tried that too)

MDGM 22 Posting Whiz in Training

Ahhh okay I see so it finds any array's where co_uk is written and converts it to co.uk

- i got a parse error:

Parse error: syntax error, unexpected T_FOREACH, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/sites/economizerz.com/public_html/test/maxwhois/maxWhois.class.php on line 8
<?php

class maxWhois{

    var $serverList;
    var $tr = 0;
	
foreach($_POST as 9 = 'co_uk')
{
	$_POST[str_replace("_", ".", $key)] = $value;
}
print_r($_POST);

echo "<br />" . $_POST['.co.uk'];

possibly my server is using an old version of php or something?

MDGM 22 Posting Whiz in Training

Thanks r0bb0b and nav33n however im not quite sure what to do with the code.

presumerably i put it at the beginning of the php script to make sure that it changes all strings with an underscore to have full stops instead however im not sure what $key or $value are meant to be.

I have a domain name field called "domain" and checkboxes for domain suffixes to be checked called "top_". its the domain field where the underscores need to be changed to fullstops

thanks again

MDGM 22 Posting Whiz in Training

Ah thanks for the new script. Im testing it all out but I do have one problem which is that I cant integrate a .co.uk domain suffix into it.

this is an example of the code used to check the .com suffix:

$this->serverList[0]['top']      = 'com';
	$this->serverList[0]['server']   = 'whois.crsnic.net';
	$this->serverList[0]['response'] = 'No match for';
	$this->serverList[0]['check']    = true;

and this is what i wrote (at the end of the suffix list) to try and get .co.uk working

$this->serverList[9]['top']      = 'co.uk';
	$this->serverList[9]['server']   = 'whois.nic.uk';
	$this->serverList[9]['response'] = 'No match for';
	$this->serverList[9]['check']    = false;

iv tried quite a few different servers and none of them work however i think the problem its the .uk section of it (presumerably the ".") because when I put .uk it works normally but obviously dosnt find a proper result. do you have any idea how to fix it? I think it might be more complicated than just adding my .co.uk section but i cant find any support from any of the websites holding the script or any other forums.

Thanks
(youv been helping me with web designing for AAAAGES now!! its MUCH appreciated :D)

Max

MDGM 22 Posting Whiz in Training

ah well i took out all of the irelavent information before posting it - for example at the moment if the whois dosnt find anything for a domain it will write a paypal add to basket button so i took all that out and in the process might have killed it a bit :P

here is an example of where the script is working:
http://www.economizerz.com/daniweb/whoisscriptexample.php

the full script im currently using is:

<?
if ($_POST['type']!="") define('TYPE', $_POST['type']); else define('TYPE', '');
if ($_POST['domain']!="") define('DOMAIN', $_POST['domain']); else define('DOMAIN', '');
// .com domains
define('COM_SERVER', "rs.internic.net"); // server to lookup for domain name
define('COM_NOMATCH', "No match"); // string returned by server if the domain is not found
define('COM_INCLUDE', true); // include this domain in lookup

function search_form($error){
echo $error;
?>
<center><form name="whois" method="post" action="">
  <input name="domain" style="text-align:center" type="text" id="domain"  value="Choose your domain!" onclick="clearwhois();" onblur="returnwhois()" />
<input name="Search" type="submit" id="Search" value="Go!">
</form></center>
  <?
}

if($_REQUEST['Search']){

if($error){
search_form($error);
}
else{

$ns = fsockopen('rs.internic.net',43);
fputs($ns, $_POST['domain']."\r\n");
$result = '';

$suffix = strstr($_POST['domain'], '.');
if ($suffix == '.co.uk') $suffixprice = '3';
if ($suffix == '.com') $suffixprice = '5';
if ($suffix == '.net') $suffixprice = '8';

while(!feof($ns)) $result .= fgets($ns,128);
fclose($ns);
if (eregi('No match',$result)) {
echo '<center><form name="whois" method="post" action="">
  <input name="domain" style="text-align:center" type="text" id="domain"  value="Choose your domain!" onclick="clearwhois();" onblur="returnwhois()" />
<input name="Search" type="submit" id="Search" value="Go!">
</form>

<table border="0" cellpadding="0" cellspacing="3"><tr><th align="center" valign="middle" scope="col"><img src="../../images/other/tick.png"></tr><th align="center" valign="middle" scope="col">Domain Name '.$_POST['domain'].' is free.</tr></table><br /></form>
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="submit" value="Add to basket!">
<input …
MDGM 22 Posting Whiz in Training

hi guys,

I found a simple whois script and intregrated it completely into my site before testing it on IE (oooops!) and it only works on firefox and safari. On IE the result text that should be written as a result of the below section of the code:

if (eregi('No match',$result)) {
echo 'Domain Name '.$_POST['domain'].' is free.';

dosnt show up... the script im using is below.

<?
if ($_POST['type']!="") define('TYPE', $_POST['type']); else define('TYPE', '');
if ($_POST['domain']!="") define('DOMAIN', $_POST['domain']); else define('DOMAIN', '');
// .com domains
define('COM_SERVER', "rs.internic.net"); // server to lookup for domain name
define('COM_NOMATCH', "No match"); // string returned by server if the domain is not found
define('COM_INCLUDE', true); // include this domain in lookup

function search_form($error){
echo $error;
?>
<form name="whois" method="post" action="">
  <input name="domain" style="text-align:center" type="text" id="domain"  value="Choose your domain!" />
<input name="Search" type="submit" id="Search" value="Go!">
</form>
  <?
}

if($_REQUEST['Search']){

if($error){
search_form($error);
}
else{

$ns = fsockopen('rs.internic.net',43);
fputs($ns, $_POST['domain']."\r\n");
$result = '';

while(!feof($ns)) $result .= fgets($ns,128);
fclose($ns);
if (eregi('No match',$result)) {
echo 'Domain Name '.$_POST['domain'].' is free.';
}
else {
echo 'Domain Name '.$_POST['domain'].' is not available.';
}
}
}
else{
search_form($error);
}

?>

Any ideas why not?

Thanks for the help,

Max

MDGM 22 Posting Whiz in Training

Hey,

Simple javascript problem:

user enters desired domain name into "domain" field and submits, php scripts check if domain is available. If it is, a paypal add to basket button is written onto the page, however i cannot use php to get the content of the "domain" field and put it into hidden fields of the paypal button for various reasons so instead I need to use javascript. Also i want to search what the user entered to find out what kind of domain suffix they typed (.co.uk, .com etc) and write a variable with a corresponding price. I have VERY little experience with javascript and am only really able to code what is below from knowledge of php and tutorials but the script isnt working. any ideas?

var domain = document.getElementById("domain").value;

var domainsuffix1 = (domain.search(/.com/i));
if (var domainsuffix1 > 0) {var domainsuffix = "£5";};

Thanks,


Max

MDGM 22 Posting Whiz in Training

Okay :) Glad you got things working.

MDGM 22 Posting Whiz in Training

kk. Its me who is uploading the pictures anyway so it should be fine. But in future ill probably need to use it again :)

Thanks everybody

MDGM 22 Posting Whiz in Training

Ah okay that works fine. I actually found this solution just as you sent your reply which is:

$name = substr($_POST['name'], 0, -4); //gets rid of last 4 characters. remove the ", 0" to get rid of first 4 characters. Refer to http://uk2.php.net/manual/en/function.substr.php

That works too but only gets rid of the last 4 letters. In my case im sure they are all jpg but other people may want to use another method.

Thanks for your help.

And thanks allexxei too

MDGM 22 Posting Whiz in Training

Hi all,

I just need to delete .jpg form the end of a variable stored like this:

$name = $_POST["name"];

Thanks :D

Max

ps
echo stristr($name, '.', true); // As of PHP 5.3.0, outputs *content of string BEFORE the first full stop*
dosnt work. im guessing its because my php on my server is a different version than 5.3.0
this is the code i tested just to make sure it wasnt a silly mistake

$email = 'USER@EXAMPLE.com';
echo stristr($email, 'e'); // outputs ER@EXAMPLE.com
echo stristr($email, 'e', true); // As of PHP 5.3.0, outputs US
MDGM 22 Posting Whiz in Training

Hi,

I just want to say that Iv only been doing php for a few days now but i think i can give you a good answer.

You want a drop down menu which decides which database the next page connects to only using html and php?

Form page:

<form id="connect" name="connect" method="post" action="connect.php">
  <select name="dbchoice" id="dbchoice">
    <option value="db1">db1</option>
    <option value="db2">db2</option>
    <option value="db3">db3</option>
  </select>
</form>

Action page:

<?php
$dbchoice = $_POST['$dbchoice']; 
//the above line gets the value from the drop down box on the previous page

mysql_connect("localhost", "username", "password") or die(mysql_error());
mysql_select_db("$dbchoice") or die(mysql_error());;
//above this text NOW where it sayd $dbchoice, the server is writting in the value from the drop down form from the previous page. this means that the database chosen is the one with the same name as what the user chose on the form.
?>

I hope that answered your question =]

ps. the only thing im not 100% sure about is the format of this bit:

mysql_select_db("$dbchoice")

So if it dosnt work that is the section that is most likely to be wrong. Maybe ask somebody else or try

mysql_select_db($dbchoice)

MDGM 22 Posting Whiz in Training

Hey again,

Iv managed to get used to the CREAT TABLE, INSERT and SELECT functions and so iv decided that when i put up the details for a new picture ill create a table with the file name of the new picture (excluding the .jpg at the end) and then when I need to bring back the details using the hidden field's value i just get all of the contents of the table that has the name thats the same as that hidden field value. So it should all work fine. Im having a few learning curves along the way but i should be fine :)

Thanks for the guidance.

Max

MDGM 22 Posting Whiz in Training

Thanks ;) I thought it wasnt working but that was because i needed to call the table something with .jpg at the end and iv realised i cant do that. No worries iv found a work around.

Max

MDGM 22 Posting Whiz in Training

Thanks for the help :D however I don't see how this is not working :s

$sql = 'CREATE TABLE `web163-gallery-7`.`{$picurl}` (`name` VARCHAR( 200 ) NOT NULL ,`picurl` VARCHAR( 200 ) NOT NULL ,`group` VARCHAR( 200 ) NOT NULL ,`dateadded` TIMESTAMP( 200 ) NOT NULL DEFAULT CURRENT_TIMESTAMP ,`id` INT( 200 ) NOT NULL ,PRIMARY KEY ( `id` ) ,UNIQUE (`name` ,`picurl`)';

mysql_query($sql)
MDGM 22 Posting Whiz in Training

Hey,

Im just wondering how i can get something like this to work:

$tablename = $_POST['tablename']; 
mysql_query(CREATE TABLE `databasename`.`$tablename` (`name` VARCHAR( 200 ) NOT NULL))

At the moment its coming up with an error because I am using a variable for the table name instead of inputting it normally.

Thanks,

Max

Mosh_1 commented: So do it like this: `$name` +0
MDGM 22 Posting Whiz in Training

worked perfectly, thanks :)

MDGM 22 Posting Whiz in Training

Hi guys,

I have a simple registration form and have had trouble getting it to check if the username is already taken in the database. This is what I have at the moment:
(the code i tried to use to make the check is about half way down)

<?php
mysql_connect("", "", "") or die(mysql_error());
mysql_select_db("") or die(mysql_error());;

$fname = $_POST["fname"];
$lname = $_POST["lname"];
$uname = $_POST["uname"];
$pword = $_POST["pword"];
$email = $_POST["email"];
//above values are taken from form on previous page...
//first  name, last name, username, password and email

$subject = "Thankyou for registering with Grafax!";
$from = "**myemail**";
$message = 'You have just registered the following details at Grafax.co.uk:<hr/>
<table bgcolor="#E0E0E0">
<strong>First Name: </strong>'. $fname .'<br/>
<strong>Last Name: </strong>'. $lname .'<br/>
<strong>Username: </strong>'. $uname .'<br/>
<strong>Password: </strong>'. $pword .'</table>
<hr/>
<h3><a href="#">Click here to login</a></h3>';


//this is where i tried to check the username against whats in the database. 
//If $uname entered by user is different to the result from the mysql query 
//then insert information. it didnt work.... :P
$dbunames = mysql_query("SELECT * FROM logins WHERE uname='$uname'");
if ($uname != $dbunames)


{
mysql_query("INSERT INTO ``.`` (`fname`, `lname`, `uname`, `pword`, `email`) VALUES ('$fname', '$lname', '$uname', '$pword', '$email')");
mail($email,$subject,$message,"From:$from\r\nReply-to: $from\r\nContent-type: text/html; charset=us-ascii");
echo "<h1>Successfully added: </h1><br><h3>fname:</h3>";
echo $fname;
echo "<br /><h3>lname:</h3>";
echo $lname;
echo "<br /><h3>uname:</h3>";
echo $uname;
echo "<br /><h3>pword:</h3>";
echo $pword;
echo "<hr>";
echo "<h1>Email sent to ". $email ."</h1>";
}
else 
{
echo "Username taken.";
}
?>
<head>
<title>Insert Outcome</title>
</head>

Thanks all.

Max

MDGM 22 Posting Whiz in Training

ha xD Thanks guys :) i swear i tried that :P

oh wells thanks for the help guys. and ill def. include the protection against mysql injection

now just to find out what it actually is..... :P

Thanks again.

MDGM 22 Posting Whiz in Training

Hi all,

I have just put together a simple log in script from various tutorials on the web and at the moment it is only checking the username entered by the user against what is in my database.
I cant find any infromation about any kind of AND function or any other check the password as well as the username so thats what i need help with

here is what i have already:

<?php
// Connects to your Database
mysql_connect("", "", "") or die(mysql_error());
mysql_select_db("") or die(mysql_error());;

$uname = $_POST['uname'];
$pword = $_POST['pword'];
//gets username and password from uname and pword fields on previous page

$result = mysql_query("SELECT * FROM logins WHERE uname='$uname'");

if($row = mysql_fetch_array($result))
  {
  setcookie("loggedin", "$uname", time()+3600);
  echo "logged in as: ";
  echo $row['uname'];
  echo "<br />and cookie written.";
  echo "<br />";
  echo 'click <a href="cookie.php">here</a> to view cookie information.<br/><a href="login.php">Back to login page.</a>';
  }
else
{
echo "wrong login information";
}
?>

Thanks guyyys :D

Max

MDGM 22 Posting Whiz in Training

i need a php script to terraform the globe.. help pls

ktnxbai

MDGM 22 Posting Whiz in Training

okay thanks a lot :) Ill let you know how i get on. :)

MDGM 22 Posting Whiz in Training

Hi all =]

I have a php script which gets the file name of every .jpg file in a folder and then writes the <img>, and a form. The script uses a string called "galleryarray" to store the filename, which is then called into a hidden field so when the form is submitted, the next page knows what picture the user selected.

what i want is a php script on the next page which returns all of the information about the "galleryarray" hidden field's value (the picture the user selected) from a database.

Im not sure how to go about this - Where to store the information (seperate databases, tables or just fields etc), how to do a search query or how to call groups of values from a database...

Im open to suggestions but you should probably know that i have only just been able to connect my web page to my database for the first time (after a long ... LONG time of trying) about 2 hours ago. Since then I have been messing around with login page tut's with no success...! haha. so yeah, keep it simple please im not advanced at all in my mysql (or php) knowledge xD So code snippits or links to tut's i can use would be really good :D

Thanks so much.. :)

Max

MDGM 22 Posting Whiz in Training

Thanks nav33n =] works nicely

MDGM 22 Posting Whiz in Training

Okay thanks for the help everybody =]

MDGM 22 Posting Whiz in Training

Thanks for the links kvdd.

just incase other people need the script this is what i put together:

<?php
$site = $_REQUEST['site'] ; //gets string value from the field in the form on previous page called site
$sitetwo = stristr($site,'.');  //makes a new string called sitetwo by searching the site string for a "." everything after the first "."

echo "<h1>price: </h1>"; //writes price heading. Delete this line if you want
if ( $sitetwo == ".co.uk" ) {echo "£3";} //if sitetwo string is .co.uk then write £3
if ( $sitetwo == ".com" ) {echo "£4";} //if sitetwo string is .com then write £4
if ( $sitetwo == ".net" ) {echo "£5";} //etc
if ( $sitetwo == ".org" ) {echo "£6";} //etc
if ( $sitetwo == ".me.uk" ) {echo "£7";} 
if ( $sitetwo == ".co.nr" ) {echo "£8";} 
if ( $sitetwo == ".biz" ) {echo "£9";} 
?>
MDGM 22 Posting Whiz in Training

Hey,

Im designing a website hosting business's website and have a relatively simple whois script which when you enter the website, it checks if it is available then returns some text in a span just under the form.

At the moment the user types in any domain type (.co.uk / .com / .net etc) at the end of the actual domain name, and obviously I need to price the domain according to what type of domain they want. And so i need a script which scans what they entered to try to detect the type of domain they entered and then creates a string with the price of that domain type which i can then write into the document using php, and also the domain type itself.

As it is, I just call the domain name (as the user entered it for example max.com) from forms or hidden fields on the previous pages. These choices (package and domain and then values for their prices) are passed on from page to page using hidden fields.

Quite a lengthy brief so i hope it makes sense!

(http://economizerz.com/ is the website)

Thanks a lot.

Max

MDGM 22 Posting Whiz in Training

***quick correction:

IF hidden field value from the previous page is empty then the script should write "blah"

MDGM 22 Posting Whiz in Training

Hey guys,

I have a script calling the value from a hidden field from the previous page and then writing it to the page. What code would I have to use to say:

IF hidden field value from the previous page is empty then the hidden field value should be changed to "blah"

Current script:

<?php echo $_REQUEST['Siteprice'] ; ?>

Thanks

Max

MDGM 22 Posting Whiz in Training

yeah i have php but no idea how to use it! I just got a new webhost because my previous one didnt offer php so i was stuck with asp but yeah i have php now... any ideas about what i kind of script i would need then?

Sorry for the late reply

Thanks again for your help

Max

MDGM 22 Posting Whiz in Training

im the network administrator :D

dont worry, ill send an email to my website registrar or something

Thanks for your help

Max

MDGM 22 Posting Whiz in Training

im not sure what my hostname, user name and passwords are... any ideas? Or any ideas on how to change them?

MDGM 22 Posting Whiz in Training

ill try changing them around a bit. do you have any suggestions as what to put where?

MDGM 22 Posting Whiz in Training

Ah okay thanks. Also when i try it now i get the following error:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dbOne'@'79.170.40.163' (using password: YES) in /home/sites/grafax.co.uk/public_html/db/save_it.php on line 4
Could not connect to localhost.

Its probably because im putting in the wrong localhost, database and table information. Can you take a quick look at the code im using and this screen shot to make sure the connection info links up?
http://www.grafax.co.uk/db.bmp
Thanks! =]
Max

MDGM 22 Posting Whiz in Training

Hi guys,

I did a quick tutorial on the internet on using php and mysql. It is my first ever time using it so forgive me if im being a bit of a "NOOB".

anyways ill post the script below and can you give me a few pointers about where im going wrong?

Bare in mind its my first time using these scripts and phpmyadmin.
--------------------------------------------------------------------------------------------------------------

<?php
$db=mysql_connect("grafax.co.uk", "dbOne", "*password*") or die("Could not connect to localhost."); mysql_select_db("people", $db) or die("Could not find database.");

// The above lines establishes a connection with the database. Keep localhost as is unless something different is mentioned by your sql host. usrnm is user name and pswd is password. What I want to say is, copy these lines as they are and just replace the required fields and it should connect.

$querySQL = "insert into people (d_Name, d_Birthday,
d_Birthday) values ($Name, $Birthday, $Telephone)";
if(!$querySQL) error_message(sql_error());

// The above statement generates an error if you have setup the table in such a way that there should not be a duplicate entry.
?>
<form name="toSave" method="post" action="save_it.php">
  <p>name 
    <input type="text" name="Name" size="100" />
    <br> 
birthday 
<input type="text" name="Birthday" size="50" />
<br> 
telephone 
<input type="text" name="Telephone" size="50" /> 
</p>
  <p>
    <input type="submit" name="Submit" value="Submit" />
  </p>
</form>

--------------------------------------------------------------------------------------------------------------

Go on this link to see a screen shot of my database's settings etc.
http://www.grafax.co.uk/db.bmp

--------------------------------------------------------------------------------------------------------------
As far as i know, my database is called either web163-dbone (or as I named …

MDGM 22 Posting Whiz in Training

Okay thanks for that. The only other thing is that I needed the frames to appear after the link has been clicked on. for example you have a regular page, no frames just content, but when you click on a link which goes to www.google.com, it will use a frame for the top (header.html) which for example would have my logo on it, and then the bottom (main) frame will contain www.google.com. So the site only uses frames when going onto an external link, otherwise no frames are used.

Thanks again,

Max

MDGM 22 Posting Whiz in Training

Hi guys,

Wasn't too sure which forum to put this in as im not sure what kind of script would be used, but this is what I want to be able to do:

Have some kind of script that makes any external link on my website open the link and have a frame with my content at the top (like when you find an image using google images search and theyr frame is at the top.)

Thanks for your time =]

Max

MDGM 22 Posting Whiz in Training

Hi all,

I need to know how to be able to make a div box with a fixed width and no horizontal scrollbar, and stretchable height with vertical scrollbar.

It should be quite a simple thing to do but i cant do it for some reason.

Thanks guys =]

Max

MDGM 22 Posting Whiz in Training

Hey Peter,

Thanks for the reply. Ill send an email to nominet and see if they can find out anything.

The only problem with finding payment information is that the website is just a domain which uses a frame redirect service to get its content, so it was something like £3 a year so the payment would have been sometime last year so it might be very hard to dig it up.

Anyway thanks for your help =]

Still open to suggestions though

Max

MDGM 22 Posting Whiz in Training

Hi all

I guess this post kind of vaguely slightly possibly fits into this forum
sorry :P
but I know daniweb is very reliable for help so i thought id post on here.

Basically I need to register a website that I had registered this time last year, but a few weeks ago i decided not to renew it. So in theory when re-registering it now shouldnt be a problem however when I try to, it says I need to transfer it from my existing registrar. but i dont know who my existing registrar is!! :s

This is the result of a whois search
-----------------------------------------------------------------
Domain name:
swmassive.co.uk

Registrant:
Max Mumford

Registrant type:
UK Individual

Registrant's address:
336 Upper Shoreham Road
Shoreham-By-Sea
BN43 5QE
GB

Registrar:
No registrar listed.

Relevant dates:
Registered on: 13-May-2007
Renewal date: 13-May-2009
Last updated: 29-Aug-2007

Registration status:
Registered until renewal date.

Name servers:
No name servers listed.
------------------------------------------------------------------------
Any ideas? :s

thanks guys

Max

MDGM 22 Posting Whiz in Training

Hi all!

I need to know how to repeat a javascript code snippet, until the table's row is full - so without stretching it. The row is inside the middle column of an 80% width table, made up of 3 columns, one for a left side graphic, the middle column for the content, and the right hand side one for the right side graphic.

All the javascript code is writes in a random 35/35 thumbnail image, and so i want this to repeat all the way to the end, so its good for all resolutions.

Thanks verrrry much guys and gals :]
Max

PS. Page: http://www.grafax.co.uk/testingserver/daniweb/example.html
& its the images at the top that I want repeated right to the edge.