Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-11-2005, 01:53 AM
General Nuisance is offline General Nuisance
Registered User

Join Date: Oct 2004
Posts: 616

Send a message via ICQ to General Nuisance
yet another problem...

hey guys im beginning to think that this board was created just for me.. lol

just made this become affiliates script and its getting this error...

Parse error: parse error, unexpected $ in /var/www/localhost/htdocs/novazone/become_affiliates.php on line 61

i have looked over it and found a few minor issues but still didnt fix the error...

//I know there isnt any mysql_connect commands..//

PHP Code:
<?php

$self 
$_SERVER['PHP_SELF'];
$email $_POST['email'];
$wn $_POST['wn'];
$wurl $_POST['wurl'];
$wage $_POST['wage'];
?>
<html>
<body text="#FFFFFF" background="themes/default/back.gif" link="#FFFFFF" vlink="#FFFFFF" alink="#339933">

To become an Affiliate With The Nova-Zone we expect the following:
<BR>
<BR>
<li>That your site has been in operation for a least 30 days</li>
<li>Not A squad</li>
<li>Must Have a Paid Domain</li>
<BR>
<BR>
If your site contains ANY* of the following it will be removed ASAP.
<BR>
<BR>
<LI>ANY* FORM OF CHEATS THIS INCLUDES LINKS OR DOWNLOADS</li>
<li>ANY FORM OF PORNOGRAPHIC MATERIAL</li>
<li>Not active</li>
<BR>
<BR>
We also request that you add our link to your site.
<BR>
<BR>
If you feel that your site matches the above requirements then feel free to submit your request using the form below.
<BR>
<BR>
<form method="POST" action="<?php echo (' $self ');?>">
  Your Email Address: <input type="text" name="email" size="20"></p>
  <p>Your Websites Name: <input type="text" name="wn" size="20"></p>
  <p>Your Websites URL: <input type="text" name="wurl" size="20"></p>
  <p>How long your site has been around*THIS WILL BE CHECKED*:
  <input type="text" name="wage" size="20"></p>
  <p><input type="submit" value="Submit" name="submit"></p></form>
<?php
if( $email and $wn and $wurl and $wage )
{
//create the query//
$sql="insert into affiliates (email, wn, wurl, wage) values ( $email, '$wn', '$wurl', '$wage')";
//EXECUTE THE QUERY//
$rs $DB->Query$sql );
//confirm the added entry//
if($rs)
{
echo 
'Thank You For submiting Your Request we will be in contact with you.'
}
?>
* = BUT NOT LIMITED TO.
</body>
</html>
Thanks in advance..
__________________
The Nova-Zone


http://youraite.yourhost.yourusername.com - long urls
-looks bad
-who can remember it?
- Solution?
- Get a short Nova-Zone subdomain! Yoursite.nova-zone.com
- Now thats smart. just ask for one via pm,email or contact page on site.
Reply With Quote
  #2  
Old 08-11-2005, 06:31 AM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

If you coded with tabs it would be alot easier to see... yout missing an } after your first If statement.
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #3  
Old 08-11-2005, 10:18 AM
General Nuisance is offline General Nuisance
Registered User

Join Date: Oct 2004
Posts: 616

Send a message via ICQ to General Nuisance
ahh.. thanks...

i generally do put allot of spaces in between the stuff but i didnt on that one for some reason...
__________________
The Nova-Zone


http://youraite.yourhost.yourusername.com - long urls
-looks bad
-who can remember it?
- Solution?
- Get a short Nova-Zone subdomain! Yoursite.nova-zone.com
- Now thats smart. just ask for one via pm,email or contact page on site.
Reply With Quote
  #4  
Old 08-11-2005, 11:03 AM
General Nuisance is offline General Nuisance
Registered User

Join Date: Oct 2004
Posts: 616

Send a message via ICQ to General Nuisance
ok i added that and it does work now but when i fill out the form it does not submit the data to mysql and come up with page cannot be displayed..

http://nova-zone.com/become_affiliates.php

edit just tried the link above and it has the url bar and it says $self up there... hmm..
__________________
The Nova-Zone


http://youraite.yourhost.yourusername.com - long urls
-looks bad
-who can remember it?
- Solution?
- Get a short Nova-Zone subdomain! Yoursite.nova-zone.com
- Now thats smart. just ask for one via pm,email or contact page on site.
Reply With Quote
  #5  
Old 08-11-2005, 11:08 AM
General Nuisance is offline General Nuisance
Registered User

Join Date: Oct 2004
Posts: 616

Send a message via ICQ to General Nuisance
ok i found it

i had:
PHP Code:

<form method="POST" action="<?php echo (' $self ');?>">
i took out the 2 ' 's and it worked

dont quite understand but who cares it works...

EDIT:

ok its working now but only if i put email as my email address if i put GeneraNuisance@charter.net it says invalid mysql sytax and if i put GeneralNuisanceATcharter.net then it says invalid field name and if i put email it works fine...

__________________
The Nova-Zone


http://youraite.yourhost.yourusername.com - long urls
-looks bad
-who can remember it?
- Solution?
- Get a short Nova-Zone subdomain! Yoursite.nova-zone.com
- Now thats smart. just ask for one via pm,email or contact page on site.

Last edited by General Nuisance; 08-11-2005 at 11:21 AM.
Reply With Quote
  #6  
Old 08-11-2005, 11:10 AM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

when I try to submit the form I get:

Fatal error: Call to a member function on a non-object in /var/www/localhost/htdocs/novazone/become_affiliates.php on line 53

which is prolly $DB->Query( $sql );

I was wondering about that because there is no class in that script and there is no include to include a file with the class..?
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #7  
Old 08-11-2005, 11:23 AM
General Nuisance is offline General Nuisance
Registered User

Join Date: Oct 2004
Posts: 616

Send a message via ICQ to General Nuisance
i was typing while you were.. lol go back and read my post above..

and yes i forgot that... because i have my site built i cant have it as a popup i had to make it a regular page...
__________________
The Nova-Zone


http://youraite.yourhost.yourusername.com - long urls
-looks bad
-who can remember it?
- Solution?
- Get a short Nova-Zone subdomain! Yoursite.nova-zone.com
- Now thats smart. just ask for one via pm,email or contact page on site.
Reply With Quote
  #8  
Old 08-11-2005, 11:56 AM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

on the mysql insert your missing the 2 quotes, '$email'
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #9  
Old 08-11-2005, 12:23 PM
General Nuisance is offline General Nuisance
Registered User

Join Date: Oct 2004
Posts: 616

Send a message via ICQ to General Nuisance
cool, thanks..

try it....

i would like to make the Thank you message appear by itself.. if its possible..
__________________
The Nova-Zone


http://youraite.yourhost.yourusername.com - long urls
-looks bad
-who can remember it?
- Solution?
- Get a short Nova-Zone subdomain! Yoursite.nova-zone.com
- Now thats smart. just ask for one via pm,email or contact page on site.
Reply With Quote
  #10  
Old 08-11-2005, 12:48 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

change your code around a bit:

put
PHP Code:
<?php 
if( $email and $wn and $wurl and $wage 

//create the query// 
$sql="insert into affiliates (email, wn, wurl, wage) values ( $email, '$wn', '$wurl', '$wage')"
//EXECUTE THE QUERY// 
$rs $DB->Query$sql ); 
//confirm the added entry// 
if($rs

echo 
'Thank You For submiting Your Request we will be in contact with you.'

?>
after the first bit of code and then put exit; where you want it to stop the script, in your case after the thanks message.
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #11  
Old 08-11-2005, 01:04 PM
General Nuisance is offline General Nuisance
Registered User

Join Date: Oct 2004
Posts: 616

Send a message via ICQ to General Nuisance
still goes to bottm of page....

this is current script..

PHP Code:
<?php
require('themes/default/header.php');


$self $_SERVER['PHP_SELF'];
$email $_POST['email'];
$wn $_POST['wn'];
$wurl $_POST['wurl'];
$wage $_POST['wage'];
?>



<html>
<body text="#FFFFFF" background="themes/default/back.gif" link="#FFFFFF" vlink="#FFFFFF" alink="#339933">

To become an Affiliate With The Nova-Zone we expect the following:
<BR>
<BR>
<li>That your site has been in operation for a least 30 days</li>
<li>Not A squad</li>
<li>Must Have a Paid Domain</li>
<BR>
<BR>
If your site contains ANY* of the following it will be removed ASAP.
<BR>
<BR>
<LI>ANY* FORM OF CHEATS THIS INCLUDES LINKS OR DOWNLOADS</li>
<li>ANY FORM OF PORNOGRAPHIC MATERIAL</li>
<li>Not active</li>
<BR>
<BR>
We also request that you add our link to your site.
<BR>
<BR>
If you feel that your site matches the above requirements then feel free to submit your request using the form below.
<BR>
<BR>
<form method="POST" action="<?php echo ( $self );?>">
  Your Email Address: <input type="text" name="email" size="20"></p>
  <p>Your Websites Name: <input type="text" name="wn" size="20"></p>
  <p>Your Websites URL: <input type="text" name="wurl" size="20"></p>
  <p>How long your site has been around*THIS WILL BE CHECKED*:
  <input type="text" name="wage" size="20"></p>
  <p><input type="submit" value="Submit" name="submit"></p></form>

<?php
if( $email and $wn and $wurl and $wage 

//create the query// 

$sql="insert into affiliates (email, wn, wurl, wage) values ( '$email', '$wn', '$wurl', '$wage')"

//EXECUTE THE QUERY// 

$rs $DB->Query$sql ); 
}
//confirm the added entry// 

if($rs

echo 
'Thank You For submiting Your Request we will be in contact with you.'


exit;
?>
<BR>
<BR>
* = BUT NOT LIMITED TO.
<?php require('themes/default/footer.php'); ?>
</body>
</html>
__________________
The Nova-Zone


http://youraite.yourhost.yourusername.com - long urls
-looks bad
-who can remember it?
- Solution?
- Get a short Nova-Zone subdomain! Yoursite.nova-zone.com
- Now thats smart. just ask for one via pm,email or contact page on site.
Reply With Quote
  #12  
Old 08-13-2005, 10:54 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

try putting your form code into the if else statement...
Reply With Quote
  #13  
Old 08-13-2005, 11:25 PM
General Nuisance is offline General Nuisance
Registered User

Join Date: Oct 2004
Posts: 616

Send a message via ICQ to General Nuisance
Quote:
Originally posted by -Elite-
try putting your form code into the if else statement...
that worked thanks allot..
__________________
The Nova-Zone


http://youraite.yourhost.yourusername.com - long urls
-looks bad
-who can remember it?
- Solution?
- Get a short Nova-Zone subdomain! Yoursite.nova-zone.com
- Now thats smart. just ask for one via pm,email or contact page on site.
Reply With Quote
  #14  
Old 08-17-2005, 12:57 AM
E,FuDD is offline E,FuDD
Registered User

Join Date: Aug 2005
Posts: 5

tried it now, it looks a1
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
little problem Mauser 98K Tech Support 5 04-15-2008 07:32 PM
a little problem ... VooDoo- Tech Support 2 03-09-2008 11:28 PM
i have a problem .enfo. Tech Support 9 05-24-2004 04:57 PM
PROBLEM !!! csman Delta Force 1 12-24-2003 08:31 AM


All times are GMT -5. The time now is 12:19 PM.




Powered by vBulletin®