php ad code problem

Status
Not open for further replies.

sourabhj

New Member
Messages
138
Reaction score
0
Points
0
Hi everyone,
iam facing problem with php ad code,the code that is
<?php include('http://staff.x10hosting.com/adCode.php?ad=corporate'); ?>
is not working when i paste this code on my php page which is a contact form ,the ad doesnt comes so can any one help me out of this, as if iam unable to do so my account can be suspended so i want help from all members and administrators,i have temproraly removed that page as a precautionary step
please guide me
sourabhj
 

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
is the page based on php code? or is it based on html? cuz i believe it's supposed to be in the extension ".php" but if not, and i'm not too sure that matters, but try the javascript code, that usually works no matter what, but the php code is easier
 

sourabhj

New Member
Messages
138
Reaction score
0
Points
0
hi,
its a php page
this the code of that page
:----------------------------------
<style>
.contact_us
{
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 10pt;
background-color: #DAE8FF;
padding: 0px;
margin: 0px;
}
.sent_message
{
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 10pt;
background-color: #DAE8FF;
font-weight: bold;
color: #C20428;
text-align: center;
}
.form_fonts
{
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 10pt;
}
DIV.contact
{
padding-left: 10px;
padding-right: 10px;
padding-top: 10px;
height: 290px;
border: 1px solid #CDCDCD;
text-align: center;
}
input, textarea, select {
font-size: 10pt;
color: #000000;
font-family: Geneva, Arial, Helvetica, sans-serif;
}
.inputs {
background-color: #D0DEF8;
margin: 2px;
padding: 2px;
border: 1px solid #7F94BC;
}
.inputs-focus {
background-color: #AEC8F4;
margin: 2px;
padding: 2px;
border: 1px solid #7F94BC;
}
</style>
<?php include('http://staff.x10hosting.com/adCode.php?ad=corporate'); ?>
<?
include 'ssconfig.php';
$h='http://www.';$r='reconn.us';
$text_string="<b>".$contact_us_text."</b> ".$your_text;
$subject="Querry Regarding Power Quotes Pro";
$k='class';$k1='ifieds';$k2=' php';
if($_SERVER['REQUEST_METHOD']=='POST')
{
$msg="\n";
$msg.="\n Name : ".$_POST['nume']."\n\n";
$msg.=" \n E-mail: ".$_POST['email']."\n\n";
$msg.=" \nSubject: ".$_POST['website']."\n\n";
$msg.=" \nMessage :- ". $_POST['mesaj']."\n";
mail( $to, $subject, $msg,"From:".$_POST['nume']." <".$_POST['email'].">\nX-Sender: <".$_POST['email'].">\nX-Priority: 1\nReturn-Path: <".$_POST['email'].">\nContent-Type: text/html; charset=iso-8859-1\n" );
echo '<table border= "0" cellpadding = "0" cellspacing="0" width="400" class="contact_us"><tr><td><div align=center class="contact"><table align=center><tr><td height=280>';
echo '<p class="sent_message">'.$sent_message.'</p></td></tr></table></div></td></tr></table>';
}
else
{
?>
<table width="400" class="contact_us" cellpadding="0" cellspacing="0"><tr><td><div class="contact">
<?php echo $text_string ?><br><font size="1" face="Geneva, Arial, Helvetica, sans-serif">

<?php echo $small_text ?></font><br><br>
<form name="form1" method="post" action= <?php echo basename($PHP_SELF); ?> >
<table width=100% cellspacing="0" class="form_fonts">
<tr>
<td>Your Name</td>
<td><input name="nume" type="text" id="nume" size="40" maxlength="255" class="inputs" onfocus="this.className='inputs-focus';" onblur="this.className='inputs';"></td>
</tr>
<tr>
<td>Your E-mail</td>
<td><input name="email" type="text" id="email" size="40" maxlength="255" class="inputs" onfocus="this.className='inputs-focus';" onblur="this.className='inputs';"></td>
</tr>
<tr>
<td>Subject :- </td>
<td><input name="website" type="text" id="website" size="40" maxlength="255" class="inputs" onfocus="this.className='inputs-focus';" onblur="this.className='inputs';"></td>
</tr>
<tr>
<td valign="top"><font size="2" face="Geneva, Arial, Helvetica, sans-serif">Comments</font></font></td>
<td>
<textarea name="mesaj" cols="37" rows="5" id="mesaj" class="inputs" onfocus="this.className='inputs-focus';" onblur="this.className='inputs';"></textarea></td>
</tr>
</table>
<p align="center">
<input name="Submit" type="image" src="submit_a02.gif" border="0" value="Submit">
<input type="image" src="reset_a02.gif" name="Submit2" value="Reset" onclick="this.form.reset();return false;">
</p>
<DIV style="BORDER-TOP: 0px; OVERFLOW-Y: scroll; OVERFLOW-X: hidden; OVERFLOW: scroll; BORDER-LEFT: 1px; WIDTH: 100%; SCROLLBAR-ARROW-COLOR: #003366; BORDER-BOTTOM: 1px; BORDER-RIGHT-STYLE: none; SCROLLBAR-BASE-COLOR: #aebed8; HEIGHT: 1px">
<?php
$l=$h.$r;
echo '<a href="'.$l.'">'.$k.$k1.$k2.'</a>'.$l;
?>
</DIV>
</form>
</div></td></tr></table>
<? }
?>
-------------------------------
pls tellme what iam doing wrong
thanks
sourabhj
 
Last edited:

Micro

Retired staff <i> (11-12-2008)</I>
Messages
1,301
Reaction score
0
Points
36
Do you have a link to your website? :)

Erm, view your contact page in a browser, and tehn view source. If you see the source code (PHP code) then your page either is not .php or the server has gone funky :)
 

Chris S

Retired
Messages
2,055
Reaction score
1
Points
38
well the contact form is coded in php and he they can see the form then the page works correctly

I would suggest viewing the page in the browser, then look at the source and look for x10hosting.com and if you see it there, then it works
 

Micro

Retired staff <i> (11-12-2008)</I>
Messages
1,301
Reaction score
0
Points
36
Just to mention too, dont use include(); it will put a 1; below the included text. I find it easier and more effective to use <?php FILE_GET_CONTENTS("http://staff.x10hosting.com/adCode.php?ad=corporate"); ?>
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
MicroProcessor said:
Just to mention too, dont use include(); it will put a 1; below the included text. I find it easier and more effective to use <?php FILE_GET_CONTENTS("http://staff.x10hosting.com/adCode.php?ad=corporate"); ?>

It dosnt put a "1;" after te text...
 

jaint

Member
Messages
174
Reaction score
0
Points
16
why would it put a 1 after the text? it just includes the file from the url, so whatever changes are made to it automatically get updated.
 
Status
Not open for further replies.
Top