timmah1
-
Posts
1,170 -
Joined
-
Last visited
Posts posted by timmah1
-
-
Can somebody tell me why this is not parsing the feed? Or showing anything for that matter??
<?php class RSSParser { var $insideitem = false; var $tag = ""; var $title = ""; var $description = ""; var $link = ""; function startElement($parser, $tagName, $attrs) { if ($this->insideitem) { $this->tag = $tagName; } elseif ($tagName == "ITEM") { $this->insideitem = true; } } function endElement($parser, $tagName) { if ($tagName == "ITEM") { printf("<dt><b><a href='%s'>%s</a></b></dt>", trim($this->link),htmlspecialchars(trim($this->title))); printf("<dd>%s</dd>",htmlspecialchars(trim($this->description))); $this->title = ""; $this->description = ""; $this->link = ""; $this->insideitem = false; } } function characterData($parser, $data) { if ($this->insideitem) { switch ($this->tag) { case "TITLE": $this->title .= $data; break; case "DESCRIPTION": $this->description .= $data; break; case "LINK": $this->link .= $data; break; } } } } $xml_parser = xml_parser_create(); $rss_parser = new RSSParser(); xml_set_object($xml_parser,&$rss_parser); xml_set_element_handler($xml_parser, "startElement", "endElement"); xml_set_character_data_handler($xml_parser, "characterData"); $fp = fopen("http://www.novafantasysports.com/xml/bbfpbasketballplayernews/node_feed/?User=bbfreepicks_nbaplayernews&pw=bbfpFFBP","r") or die("Error reading RSS data."); while ($data = fread($fp, 4096)) xml_parse($xml_parser, $data, feof($fp)) or die(sprintf("XML error: %s at line %d", xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser))); fclose($fp); xml_parser_free($xml_parser); ?>
Thanks in advance
-
Thanks gevans for all your help.
I just rearranged the } and it seems to be working right now.
Thanks again for all your help
-
It shows the variable with no problem.
I think the issue might be
$description = mysql_real_escape_string($Act);
for the description, but the posted date is
$posted_date = $_POST['posted_year']."-".$_POST['posted_month']."-".$_POST['posted_day'];
The posted_date shows with no problem
-
I put this
Picks are as follows: $description
And the only thing that shows is "Picks are as follows:"
-
Everything is being inserted into the database, so that's not the issue
-
I have a form that when it is filled out, it mails the administrator.
It sends the date correctly, but it does not send the $description
Can somebody look and see what the problem might be?
<?php if(isset($_POST['submit'])){ include("connect.php"); if (!empty($_POST['description'])) { foreach($_POST['description'] as $row=>$Act) { $description = mysql_real_escape_string($Act); $game = $_POST['posted_y'][$row]."-".$_POST['posted_m'][$row]."-".$_POST['posted_d'][$row]; $game_time = mysql_real_escape_string($_POST['game_time'][$row]); $away_team = mysql_real_escape_string($_POST['away'][$row]); $home_team = mysql_real_escape_string($_POST['home'][$row]); $premiere = mysql_real_escape_string($_POST['premiere'][$row]); $prediction = mysql_real_escape_string($_POST['prediction'][$row]); $posted_date = $_POST['posted_year']."-".$_POST['posted_month']."-".$_POST['posted_day']; $sport = mysql_real_escape_string($_POST['sport']); if (!empty($description)) { $sql = "INSERT INTO picks(sport, posted, game, game_time, description, away, home, prediction, premiere) VALUES( '$sport', '$posted_date', '$game', '$game_time', '$description', '$away_team', '$home_team', '$prediction', '$premiere');"; mysql_query($sql) or die("Sorry, there was a problem adding picks<br /> ".mysql_error()); } } echo "Picks for '".date("F j, Y", strtotime($posted_date))."' has been uploaded<br />"; echo "<a href='$back'>Go back to picks page</a><br />$count "; $to = "Vegas D Sports <tpatterson@mail.com>"; //$to = "Vegas D Sports <dgriffin@mail.com>"; $today = date("F j, Y", strtotime($posted_date)); $subject = "Pick Updates For ".$today.""; $message = " <html> <style type='text/css'> <!-- body,td,th { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } .main { border: thin solid #000; } .header { color: #fff; font-weight: bold; } --> </style> <body> <table width='600' border='0' align='center' cellpadding='0' cellspacing='0' class='main'> <tr> <td align='center' valign='top' bgcolor='#333333' class='header'><h2>BASKETBALL FREE PICKS UPDATE</h2></td> </tr> <tr> <td valign='top' align='left'><table width='100%' border='0' cellspacing='0' cellpadding='6'> <tr> <td colspan='4' bgcolor='#d6d5d5'>The following 'picks' information has been uploaded.</td> </tr> <tr> <td bgcolor='#d6d5d5'><table width='100%' border='0' cellspacing='0' cellpadding='0'> <tr> <td><strong>Date: </strong>{$today}</td> </tr> <tr> <td>Picks are as follows: {$description}</td> <--THIS PART DON'T SHOW IN EMAIL </tr> </table></td> </tr> <tr> <td colspan='4' bgcolor='#d6d5d5'> </td> </tr> </table></td> </tr> </table> </body> </html> "; } $name = "BasketballFreePicks.com"; $from = "website@basketballfreepicks.com"; $headers = "From: ". $name . " <" . $from . ">\r\n"; $headers .= "Content-Type: text/html; charset=\"iso-8859-1\""; $headers .= "Content-Transfer-Encoding: 7bit"; //$headers .= 'Cc: notify@mail.com' . "\r\n"; //$headers .= 'Bcc: tpatterson@mail.com' . "\r\n"; // now lets send the email. mail($to, $subject, $message, $headers); } ?>
Thanks in advance
-
Following tutorials to upload and convert video files to flv, I'm running into an error
Warning: exec() has been disabled for security reasons in /home/public_html/uploadvideo.php on line 47
Warning: exec() has been disabled for security reasons in /home/public_html/uploadvideo.php on line 51
Line 47 is this:
if( $fileExtension == "avi" || $fileExtension == "mpg" || $fileExtension == "mpeg" || $fileExtension == "mov" ) { //LINE 47 -->exec("ffmpeg -i ".$dynamic_path."/".$moviepath."".$fileName."-sameq -acodec mp3 -ar 22050 -ab 32 -f flv -s 320x240 ".$dynamic_path."/".$flvpath."myflv.flv"); }
Line 51 is this:
LINE 51--> exec("ffmpeg -y -i ".$dynamic_path."/".$moviepath."".$fileName."-vframes 1 -ss 00:00:03 -an -vcodec png -f rawvideo -s 110x90 ".$dynamic_path."/".$flvpath."myflv.png"); }
Here is the code
<?php $extension = "ffmpeg"; $extension_soname = $extension . "." . PHP_SHLIB_SUFFIX; $extension_fullname = PHP_EXTENSION_DIR . "/" . $extension_soname; // load extension if (!extension_loaded($extension)) { dl($extension_soname) or die("Can't load extension $extension_fullname\n"); } $array_path = explode("/",$_SERVER['SCRIPT_FILENAME']); $dynamic_path = ""; for ($i=0;$i<sizeof($array_path)-1;$i++) if($array_path[$i]!="") $dynamic_path =$dynamic_path."/".$array_path[$i]; $flvpath = "flvfiles/"; $moviepath = "movies/" ; chmod($moviepath,0777); chmod($flvpath,0777); if(isset($_FILES["x_URL"])) { $fileName = $_FILES["x_URL"]["name"]; $fileNameParts = explode( ".", $fileName ); $fileExtension = end( $fileNameParts ); $fileExtension = strtolower( $fileExtension ); if($fileExtension=="avi" || $fileExtension=="wmv" || $fileExtension=="mpeg" || $fileExtension=="mpg" || $fileExtension=="mov" ) { if ( move_uploaded_file($_FILES["x_URL"]["tmp_name"],$moviepath.$_FILES["x_URL"]["name"]) ) { if( $fileExtension == "wmv" ) { exec("ffmpeg -i ".$dynamic_path."/".$moviepath."".$fileName."-sameq -acodec mp3 -ar 22050 -ab 32 -f flv -s 320x240 ".$dynamic_path."/".$flvpath."myflv.flv"); } if( $fileExtension == "avi" || $fileExtension == "mpg" || $fileExtension == "mpeg" || $fileExtension == "mov" ) { LINE 47--> exec("ffmpeg -i ".$dynamic_path."/".$moviepath."".$fileName."-sameq -acodec mp3 -ar 22050 -ab 32 -f flv -s 320x240 ".$dynamic_path."/".$flvpath."myflv.flv"); } LINE 51--> exec("ffmpeg -y -i ".$dynamic_path."/".$moviepath."".$fileName."-vframes 1 -ss 00:00:03 -an -vcodec png -f rawvideo -s 110x90 ".$dynamic_path."/".$flvpath."myflv.png"); } else { die("The file was not uploaded"); } } else { die("Please upload file only with avi, wmv, mov or mpg extension!"); } } else { die("File not found"); } ?>
Can anybody see what the problem might be?
Thanks in advance
-
o3d,
Using this
if (!empty($_POST['description'])) { foreach($_POST['description'] as $row=>$Act) { $description=mysql_real_escape_string($Act); $posted1 = $_POST['posted1y']."-".$_POST['posted1m']."-".$_POST['posted1d']; $game = $_POST['posted_y'][$row]."-".$_POST['posted_m'][$row]."-".$_POST['posted_d'][$row]; $game_time = mysql_real_escape_string($_POST['game_time'][$row]); $away_team = mysql_real_escape_string($_POST['away'][$row]); $home_team = mysql_real_escape_string($_POST['home'][$row]); $premiere = mysql_real_escape_string($_POST['premiere'][$row]); $sport = mysql_real_escape_string($_POST['sport']); if (!empty($description)) { $sql = "INSERT INTO picks(sport, posted, game, game_time, description, away, home, premiere) VALUES( '$sport', '$posted1', '$game', '$game_time', '$description', '$away_team', '$home_team', '$premiere');"; mysql_query($sql) or die("Sorry, there was a problem adding picks<br /> ".mysql_error()); } } } echo "Picks for '".date("F j, Y", strtotime($posted1))."' has been uploaded<br />"; echo "<a href='$back'>Go back to picks page</a><br />$count "; }
It works now, but for some reason the $posted1 does not go into the database at all.
Why would that not work now?
Thanks
-
I tried this, but it still inserts all 5 even though I only filled out 1
<?php if (empty($_POST['description'])) { } else { foreach($_POST['description'] as $row=>$Act) { $description=mysql_real_escape_string($Act); $posted = $_POST['posted1y']."-".$_POST['posted1m']."-".$_POST['posted1d']; $game = $_POST['posted_y'][$row]."-".$_POST['posted_m'][$row]."-".$_POST['posted_d'][$row]; $game_time = mysql_real_escape_string($_POST['game_time'][$row]); $away_team = mysql_real_escape_string($_POST['away'][$row]); $home_team = mysql_real_escape_string($_POST['home'][$row]); $premiere = mysql_real_escape_string($_POST['premiere'][$row]); $sport = mysql_real_escape_string($_POST['sport']); $sql = "INSERT INTO picks(sport, posted, game, game_time, description, away, home, premiere) VALUES( '$sport', '$posted', '$game', '$game_time', '$description', '$away_team', '$home_team', '$premiere');"; mysql_query($sql) or die("Sorry, there was a problem adding picks<br /> ".mysql_error()); } } ?>
Anybody??
-
ok, I have this to work exactly like it should.
Now, my next question is, how do I get it to only insert if the description is filled out?
Meaning, if it's empty, it not insert that one.
<?php foreach($_POST['description'] as $row=>$Act) { $description=mysql_real_escape_string($Act); $posted = $_POST['posted1y']."-".$_POST['posted1m']."-".$_POST['posted1d']; $game = $_POST['posted_y'][$row]."-".$_POST['posted_m'][$row]."-".$_POST['posted_d'][$row]; $game_time = mysql_real_escape_string($_POST['game_time'][$row]); $away_team = mysql_real_escape_string($_POST['away'][$row]); $home_team = mysql_real_escape_string($_POST['home'][$row]); $sport = mysql_real_escape_string($_POST['sport']); $sql = "INSERT INTO picks1(sport, posted, game, game_time, description, away, home) VALUES( '$sport', '$posted', '$game', '$game_time', '$description', '$away_team', '$home_team');"; mysql_query($sql) or die("Sorry, there was a problem adding picks<br /> ".mysql_error()); echo "Picks for '".date("F j, Y", strtotime($posted))."' has been uploaded<br />"; echo "<a href='$back'>Go back to picks page</a><br />Posted: $posted<br />Game Time: $game<br />"; } ?>
Thank in advance
-
I'm going to have a maximum of 5 textareas on a form, all with the same name, but people will insert different information
My text boxes are like this:
<tr> <td align="left" valign="top">Analysis:</td> <td align="left" valign="top"><textarea name="description[]" id="description[]" cols="65" rows="25"></textarea></td> </tr> <tr> <td align="left" valign="top">Analysis:</td> <td align="left" valign="top"><textarea name="description[]" id="description[]" cols="65" rows="25"></textarea></td> </tr> <tr> <td align="left" valign="top">Analysis:</td> <td align="left" valign="top"><textarea name="description[]" id="description[]" cols="65" rows="25"></textarea></td> </tr> <tr> <td align="left" valign="top">Analysis:</td> <td align="left" valign="top"><textarea name="description[]" id="description[]" cols="65" rows="25"></textarea></td> </tr> <tr> <td align="left" valign="top">Analysis:</td> <td align="left" valign="top"><textarea name="description[]" id="description[]" cols="65" rows="25"></textarea></td> </tr>
Then my insert code is this:
$count = count($_POST['description']); for ($i = 0; $i < $count; $i++) { $description = stripslashes(mysql_real_escape_string($_POST['description'][$i])); $sql = "INSERT INTO picks(description) VALUES( '$description');"; mysql_query($sql) or die("Sorry, there was a problem adding picks<br /> ".mysql_error()); echo "Picks for '".date("F j, Y", strtotime($posted))."' has been uploaded<br />"; echo "<a href='$back'>Go back to picks page</a><br />$count"; }
But this is not working. I only inserts the last one, I need this to be able to count how many boxes have text in it, and insert each one into the database.
Can anybody tell me what I'm doing wrong?
Thanks in advance
-
Use a refresh instead
echo "Success!"; echo "<meta http-equiv=\"refresh\" content=\"3;URL=index.php\">"; mail($to, $subject, $body); } else { echo "blarg!"; }
-
I checked with phpinfo()
magic_quotes_gpc Off Off
magic_quotes_runtime Off Off
I changed the insert to this
$description = stripslashes(mysql_real_escape_string($_POST['description']));
Now, it no longer shows the \, but it don't keep the the paragraphs and lines break, just one very long pragraph
I just checked the database, and the paragraphs and break were not kept when inserting.
This is just a simple textarea, so how would I go about keep the paragraphs and line breaks?
-
Can someone take a look and tell me what I'm doing wrong?
I insert the text into the database like so
$description = mysql_real_escape_string($_POST['description']);
When I bring it out to display it, I use this
<?php echo nl2br($description); ?>
When viewing the description, this is what it shows
After squandering an opportunity to wrap up the NFC North title on their home field a week ago, the Minnesota Vikings have been given a second chance. To realize that goal, however, they\\\'ll have to knock off the team with the best record in the conference. The Vikings will try once again to punch their ticket into the postseason when the defending world champion New York Giants invade the Metrodome for this Sunday\\\'s regular-season finale. New York owns the NFL\\\'s ninth-best rushing defense (94.9 ypg) but surrendered 158 yards and four touchdowns via the ground to the physical Panthers in Week 16, with Carolina\\\'s DeAngelo Williams becoming the second back to eclipse 100 yards on the Giants this year. The team is battling some health issues up front, as sturdy tackle Fred Robbins (33 tackles, 5.5 sacks) is dealing with a jammed shoulder and may be held out of the finale. The three-man linebacking corps lacks a standout, save for middle linebacker and leading tackler Antonio Pierce (91 tackles, 1.5 sacks). There\\\'s a chance the Giants will be without a key member of the secondary for Sunday\\\'s matchup as well, with starting cornerback Aaron Ross (52 tackles, 3 INT) having suffered a concussion against the Panthers. If the second-year pro can\\\'t go, Kevin Dockery (36 tackles, 1 INT, 9 PD) will likely be slotted into a greater role for a defense that is allowing just 194.7 passing yards per game (7th overall). New York has two quality pass-rushing ends in Pro Bowler Justin Tuck (65 tackles, 12 sacks) and Mathias Kiwanuka (48 tackles, 8 sacks), but the pair will be chasing a very mobile quarterback in Jackson (143 rushing yards), who had a personal-best 76 yards on eight scrambles against the Falcons.\\r\\n\\r\\n \\r\\n\\r\\nThe Giants\\\' powerful ground attack will be going up against a Minnesota defense that is yielding a league-low 73 rushing yards per game but will be without Pro Bowl tackle Pat Williams (44 tackles, 1 sack) for a second straight week due to a fractured shoulder blade. The Vikings were able to withstand the loss of the accomplished stopper last week, however, as the club held Atlanta\\\'s Michael Turner, the NFL\\\'s second-leading rusher, to a pedestrian 70 yards on 19 carries. Williams is one of four Minnesota defenders named to this year\\\'s Pro Bowl, along with fellow tackle Kevin Williams (57 tackles, 8.5 sacks), end Jared Allen (50 tackles, 14.5 sacks) and cornerback Antoine Winfield (88 tackles, 2 INT, 2 sacks). With New York\\\'s pass protection having been an issue as of late, Coughlin may be taking somewhat of a risk in letting Manning face a Vikings\\\' squad that has compiled 43 sacks on the year. Allen\\\'s 57 1/2 sacks since 2004 is the most of any NFL player over that span, while counterpart Ray Edwards (50 tackles, 5 sacks) took down the Falcons\\\' Matt Ryan twice in last week\\\'s loss. Winfield and four-time Pro Bowl safety Darren Sharper (63 tackles, 1 INT) are the headliners of a secondary that helped limit Atlanta to a mere 124 net passing yards this past Sunday.\\r\\nTAKE THE UNDER 42 POINTS
How can I get this to show properly?
-
anybody?
-
Using stripslashes() takes away some of the \ when displaying, but not all of them.
And it don't keep the paragraphs that are in the database
-
I'm having a heck of time figuring out the correct way to put text into the database without \\\\ being inserted.
And when I display it, it shows the \\\\\
Here is my insert
$description = mysql_real_escape_string($_POST['description']);
And here is my display
<?php echo nl2br($description); ?>
How can I display the text properly?
Thanks in advance
-
PFMaBiSmAd,
I downloaded Notepad++, re-saved my page, and it works.
Do you have any idea why that would all of a sudden start doing that in DW?
Thank you for all your help
-
I took all that other stuff out, and am just using this now
<?php session_start(); require("config.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Vegas Sports Picks - Free Sports Picks - Sports Betting Picks</title> <meta name="title" content="Vegas Sports Picks - Free Sports Picks "> <meta name="description" content="<?=$desc1;?>" /> <meta name="keywords" content="<?=$keywords;?>" /> <META name="robots" content="index,follow"> <link href="https://secure.vegasdsports.com/main.css" rel="stylesheet" type="text/css" />
And I get this
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/vegas/public_html/core/index.php:1) in /home/vegas/public_html/core/index.php on line 2 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/vegas/public_html/core/index.php:1) in /home/vegas/public_html/core/index.php on line 2
I'm going nuts because has never happened before
-
I don't see an encoding choice, anywhere, and when I create a new file and save it, the same issues happens
I checked my preferences, and I see a box for Default Encoding, which is set to Unicode(UTF-, there is no option for ANSI/ASCII.
Also, there is a drop down for Unicode Normalization Form with a checkbox that says Include Unicode Signature (BOM).
The choices for the Normailization form are
C (Canonical Decomposition, followed by Canonical Compostion)
D (Canonical Decompostion)
KC (Compatitbility Decomposition, followed by Canonical Compostion)
KD (Compatitbility Decompostion)
-
PFMaBiSmAd,
I have been using DW for my pages forever, and have never ran into this problem before.
I have always started a new PHP page, and saved it and everything works fine.
How do I go about saving the page correctly?
-
Here are the errors
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/vegas/public_html/core/index.php:1) in /home/vegas/public_html/core/index.php on line 2 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/vegas/public_html/core/index.php:1) in /home/vegas/public_html/core/index.php on line 2 Warning: Cannot modify header information - headers already sent by (output started at /home/vegas/public_html/core/index.php:1) in /home/vegas/public_html/core/index.php on line 3 Warning: Cannot modify header information - headers already sent by (output started at /home/vegas/public_html/core/index.php:1) in /home/vegas/public_html/core/index.php on line 4 Warning: Cannot modify header information - headers already sent by (output started at /home/vegas/public_html/core/index.php:1) in /home/vegas/public_html/core/index.php on line 5 Warning: Cannot modify header information - headers already sent by (output started at /home/vegas/public_html/core/index.php:1) in /home/vegas/public_html/core/index.php on line 6 Warning: Cannot modify header information - headers already sent by (output started at /home/vegas/public_html/core/index.php:1) in /home/vegas/public_html/core/index.php on line 8 Warning: Cannot modify header information - headers already sent by (output started at /home/vegas/public_html/core/index.php:1) in /home/vegas/public_html/core/index.php on line 11
Here is the code
<?php session_start(); setcookie('aff_ses', session_id()); setcookie('aff_id', $_GET['aff_id']); setcookie('aff_ip', $_SERVER['REMOTE_ADDR']); setcookie('aff_ref', $_SERVER['HTTP_REFERER']); setcookie('longtime', 'nextyear', time() + (60 * 60 * 24 * 365)); $nextYear = time() + (60 * 60 * 24 * 365); setcookie('visittime', time(), $nextYear); $referer = preg_replace("/(http:\/\/(.*)\/)[\S]*/", "\\1", $_SERVER['HTTP_REFERER']); $name = preg_replace("/http:\/\//", "", $referer); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN""http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- Start Meta Data --> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Vegas Sports Picks - Free Sports Picks - Sports Betting Picks</title> <meta name="title" content="Vegas Sports Picks - Free Sports Picks "> <meta name="description" content="<?=$desc1;?>" /> <meta name="keywords" content="<?=$keywords;?>" /> <META name="robots" content="index,follow"> <link href="https://secure.vegasdsports.com/main.css" rel="stylesheet" type="text/css" />
It shouldn't matter whether this on a SSL or not right?
-
I tried this
session_start(); setcookie( 'aff_ses', session_id() );
But it still gives me the header already sent out error and I don't understand why
-
I know there is a sticky about this.
This is the top of my page, nothing is being passed except the setcookie() at the very top, unless you count the <?php
Why am I constantly getting a header already sent out error?
<?php setcookie('aff_ses', session_start()); setcookie('aff_id', $_GET['aff_id']); setcookie('aff_ip', $_SERVER['REMOTE_ADDR']); setcookie('aff_ref', $_SERVER['HTTP_REFERER']); setcookie('longtime', 'nextyear', time() + (60 * 60 * 24 * 365)); $nextYear = time() + (60 * 60 * 24 * 365); setcookie('visittime', time(), $nextYear); $referer = preg_replace("/(http:\/\/(.*)\/)[\S]*/", "\\1", $_SERVER['HTTP_REFERER']); $name = preg_replace("/http:\/\//", "", $referer); require("config2.php"); $query = "SELECT * FROM affiliates_session WHERE aff_ses = '".session_id()."' AND aff_id ='". $_COOKIE['aff_id']."'"; $q = mysql_query($query); $numrows = mysql_num_rows($q); if($numrows == 0){ $sql = "INSERT INTO affiliates_session(aff_ses, aff_id, aff_ip, aff_ref, aff_bas) VALUES( '".session_id()."', '".$_COOKIE['aff_id']."', '".$_COOKIE['aff_ip']."', '".$_COOKIE['aff_ref']."', '".$name."');"; mysql_query($sql) or die("Sorry, there was a problem adding new sponsor<br /> ".mysql_error()); //$comment = "Info has been inserted<br />"; } else { //$comment = "No info inserted<br />"; } require("testVals.php"); $current = date("Y-m-d"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN""http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- Start Meta Data --> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Vegas Sports Picks - Free Sports Picks - Sports Betting Picks</title> <meta name="title" content="Vegas Sports Picks - Free Sports Picks "> <meta name="description" content="<?=$desc1;?>" /> <meta name="keywords" content="<?=$keywords;?>" /> <META name="robots" content="index,follow"> <meta name="verify-v1" content="nVIzcVVxXdW7adyPpAZ0CsuM4QV4s7Ag1kBL088lw/M=" > <link href="https://secure.vegasdsports.com/main.css" rel="stylesheet" type="text/css" />
Another thing, this is running on a secure (SSL) server, does that make a difference?
Thanks in advance
[SOLVED] Displaying an image based on URL
in PHP Coding Help
Posted
Try this