-
Posts
252 -
Joined
-
Last visited
Posts posted by ryanfilard
-
-
this is all of my php code
<?php require_once('Connections/news.php'); ?> <?php $id = $_REQUEST['id']; if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } mysql_select_db($database_news, $news); $query_news = "SELECT * FROM news WHERE id = '$id'"; $news = mysql_query($query_news, $news) or die(mysql_error()); $row_news = mysql_fetch_assoc($news); $totalRows_news = mysql_num_rows($news); mysql_select_db($database_news, $news); $query_arguments = "SELECT * FROM argue WHERE pid = '$id'"; $arguments = mysql_query($query_arguments, $news) or die(mysql_error()); $row_arguments = mysql_fetch_assoc($arguments); $totalRows_arguments = mysql_num_rows($arguments); ?>
-
What is wrong?
Warning: mysql_select_db(): supplied resource is not a valid MySQL-Link resource in /home/rweekly/public_html/2012/view_arguments.php on line 41
Warning: mysql_query(): supplied resource is not a valid MySQL-Link resource in /home/rweekly/public_html/2012/view_arguments.php on line 43
mysql_select_db($database_news, $news); $query_news = "SELECT * FROM news WHERE id = '$id'"; $news = mysql_query($query_news, $news) or die(mysql_error()); $row_news = mysql_fetch_assoc($news); $totalRows_news = mysql_num_rows($news); mysql_select_db($database_news, $news); $query_arguments = "SELECT * FROM argue WHERE pid = '$id'"; $arguments = mysql_query($query_arguments, $news) or die(mysql_error()); $row_arguments = mysql_fetch_assoc($arguments); $totalRows_arguments = mysql_num_rows($arguments);
-
Do you manage your server with cPanel?
To check the current post_max_size is use this in your php file <?PHP phpinfo; ?>
-
It might be what your post_max_size is set to in your php configuration settings.
-
This does not work correctly and I need help with it. If $rating is equal to zero it displays 4 stars on this page http://rwdev.whekle.com/view.php?id=4571
what I am doing wrong, it is probably a simple mistake.
if($rating <= '1.5'){ $star1 = "yes"; }elseif($rating <= '2.5'){ $star2 = "yes"; }elseif($rating <= '3.5'){ $star3 = "yes"; }elseif($rating <= '4.5'){ $star4 = "yes"; }elseif($rating <= '5.0'){ $star5 = "yes"; }
-
I used this
$query_ratingsys = "UPDATE news SET votes=votes+'$newvote',rating=rating+'$ratingget' WHERE id = '$id'"; [code] It works now thank you.
-
No here is my form that submits.
<form method="post" action="view.php?id=<?PHP echo $_REQUEST['id']; ?>"> <input name="star2" type="radio" class="star" value="1"/> <input name="star2" type="radio" class="star" value="2"/> <input name="star2" type="radio" class="star" value="3"/> <input name="star2" type="radio" class="star" value="4"/> <input name="star2" type="radio" class="star" value="5"/> <input type="hidden" name="formcheck" value="rating"> <input name="rate" type="submit" id="rate" value="Rate"> </form>
-
I am trying to make a rating system and this script is not working.
$ratingget = $_REQUEST['star2']; mysql_select_db($database_news, $news); $query_ratingsys = "UPDATE news SET votes = votes +1 AND rating = rating +'$ratingget' WHERE id = '$id'"; $ratingsys = mysql_query($query_ratingsys, $news) or die(mysql_error());
-
In the top toolbar the will not align and I cannot adjust the hight and width. I have tried using css but I can't format it. Please help
-
use mod_rewrite
-
What do you think of hosting24? hostgator.com gives me so many problems and I heard that hosting24 is better.
-
What do you think about the design and features?
-
Username: phpfreaks
Password: password
-
Mine is the highest ranked but this website ripped off my design.
-
There is a link that comes up when you search one of my websites with google, it is not related to my website in any way. Is it possible to remove it by contacting google.
-
The site is offering a online blogging. It is a site I started in my spare time.
-
-
I get this error while trying to insert an update record script.
At line 687 of file "Macintosh HD:Applications:Adobe Dreamweaver CS5:Configuration:ServerBehaviors:PHP_MySQL:UpdateRecord.js" name has no properties.
-
I spent over 3 months coding and planing this website with other and I expect it to be done in about 1 more week. I was contacted by a school teacher with 200 students in total, she was asking me if it is okay for students to register. I said yes because I am adding a lot of new privacy features. She is going to use it in about a month. Do you think it is ready for action?
Demo User: ptest
Demo Pass: ptest1
-
AND private = '$priiv'
-
I am trying to make my database search only search where private = '$priiv'(Usually 0,1, or 2) but it does not work
$query_search = "SELECT * FROM users WHERE username LIKE '%$idea%' OR fname LIKE '%$idea%' OR lname LIKE '%$idea%' OR tags LIKE '%$idea%' AND private = '$priiv'";
What am i doing wrong?
-
I am developing an android application called PHP Phactory I am still working on the name. The program is for android phones and tablet but would be best suited for a tablet. With this program you can write and execute php scripts. Is this something that you would use?
-
Is mandatory evacuation really mandatory? I live in the middle of Long Island, NY and I really don't want to evacuate.
-
I made the font darker but what other colors would work better?
MySQL-Link not valid
in PHP Coding Help
Posted
I found it $news was in the required file.
But I still get this Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/rweekly/public_html/2012/view_arguments.php on line 37