Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 01-24-2007, 02:27 PM   #1 (permalink)
Senior Member
 
Join Date: 01-02-07
Location: PA, USA
Posts: 191
iTrader: 0 / 0%
Latest Blog:
None

Arenlor is liked by somebodyArenlor is liked by somebodyArenlor is liked by somebodyArenlor is liked by somebody
Send a message via ICQ to Arenlor Send a message via AIM to Arenlor Send a message via MSN to Arenlor Send a message via Yahoo to Arenlor
PHP oddly breaks

This shouldn't break to my knowledge, but it does, I'm very confused.
PHP Code:
<?php
include('head.txt');
include(
'conn.php');
$feedtitle $_POST[user];
$password $_POST[pass];
if(
$feedtitle != '' and $password != '')
{
$check "select * from rssers where title = sha1('$feedtitle') and password = sha1('$password')";
$sendchk mysql_query($check);
$valid mysql_num_rows($sendchk);
if(
$valid == '1')
{
$title $_POST[title];
$descript $_POST[descript];
$link $_POST[link];
if(
$title == '' || ($descript == 'Post Content' || $link == 'http://example.com'))
{
echo 
"<form action=\"$PHP_SELF\" method=\"post\"><label for=\"title\">Post Title<input type=\"text\" name=\"title\" /></label><br />
<textarea name=\"descript\">Post Content</textarea><br />
<label for=\"link\">Link<a href=\"#link\">*</a><input type=\"text\" name=\"link\" value=\"http://example.com\" /></label><br />
<input type=\"hidden\" value=\"$feedtitle\" name=\"user\" /><input type=\"hidden\" value=\"$password\" name=\"pass\" />
<input type=\"submit\" value=\"post\" /> <input type=\"reset\" value=\"clear\" /></form><p><a name=\"link\">*</a>You must use a unique link that you have not used within your last 15 posts, this is RSS protocol, not my choice. It will break if you don't obey.</p>"
;
}
else
{
$check mysql_query("select link from rss where title = sha1('$feedtitle') and link = '$link' order by feednum desc limit 15");
$check mysql_fetch_assoc($check);
if(
$check == '')
{
$rssfeed "insert into rss values(NULL,sha1('$feedtitle'),'$title','$descript','$link',NOW())";
$feedrss mysql_query($rssfeed);
echo 
"<p>Please click <a href=\"createrss.php\">here</a> to confirm.</p>";
}
else
{
echo 
"<p>Your link is used already, please use another link!</p><form action=\"$PHP_SELF\" method=\"post\"><label for=\"title\">Post Title<input type=\"text\" name=\"title\" /></label><br />
<textarea name=\"descript\">Post Content</textarea><br />
<label for=\"link\">Link<a href=\"#link\">*</a><input type=\"text\" name=\"link\" value=\"http://example.com\" /></label><br />
<input type=\"hidden\" value=\"$feedtitle\" name=\"user\" /><input type=\"hidden\" value=\"$password\" name=\"pass\" />
<input type=\"submit\" value=\"post\" /> <input type=\"reset\" value=\"clear\" /></form><p><a name=\"link\">*</a>You must use a unique link that you have not used within your last 15 posts, this is RSS protocol, not my choice. It will break if you don't obey.</p>"
;
}
}
}
else
{
echo 
"<p>Please login</p><form action=\"$PHP_SELF\" method=\"post\"><label for=\"user\">Feed Title<input type=\"text\" name=\"user\" /></label><br />
<label for=\"pass\">Password<input type=\"password\" name=\"pass\" /></label><br />
<input type=\"submit\" value=\"Login\" /></form>"
;
}
include(
'body.txt');
?>
It breaks with
Code:
Parse error: parse error, unexpected $ in /home/content/O/t/t/Otterbein/html/rss.php on line 51
I don't get that at all, any help would be great. Also could anyone tell me if my if statement here works right to check for dups?
PHP Code:
$check mysql_query("select link from rss where title = sha1('$feedtitle') and link = '$link' order by feednum desc limit 15");
$check mysql_fetch_assoc($check);
if(
$check == ''
Thanks for any advice and help!
Arenlor is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

 


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

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Floating divs breaks in FF, not other browsers iamPariah Coding Forum 0 07-30-2007 05:23 PM
Email Form Format: need line breaks Mrs. Grunion Coding Forum 3 06-12-2007 11:42 PM
PHP=> a text box and making breaks when needed.. HELP PLE Izzmo Coding Forum 5 07-16-2004 12:54 PM
Page Breaks..how do you go to the next page?? raciviusdawn Coding Forum 7 01-22-2004 02:37 PM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 06:49 AM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.