Jump to content

jimjim

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Everything posted by jimjim

  1. ok did that got a syntax error needed to add the * near FROM. after adding it no errors but same results all channels direct to cat_verify.php. got any ideas from here when i first started this project i used this <?php if (($channel) =="Comedy"){ include_once ('cat_verify.php); } ?> and it did work but only if the video was uploaded then got a redirect to cat_verify.php but no redirect for embedded videos in the same channel. thats why i tried to come up with a way to make it recognize channel as well as uploaded and embedded videos in that channel. this is the code that shows no errors after adding the * <?php $sql = "SELECT * FROM videos WHERE channel = 'Comedy' AND video_type = 'uploaded' OR video_type = 'embedded'"; $query = mysql_query($sql) or die( "<br>Query: $sql<br>Produced error: " . mysql_error() ); $result = @mysql_fetch_array($query); $comedy = $result["comedy"]; if ($comedy == "") { mysql_close(); header("Location: $base_url/cat_verify.php"); die(); } ?>
  2. Pikachu2000 i cant tell you how much i appreciate your help! this is what i have now...same result all channels still directed to cat_verify.php with no errors. <?php $sql = "SELECT FROM videos WHERE channel = 'Comedy' AND video_type = 'uploaded' OR video_type = 'embedded'"; $query = mysql_query($sql); $result = mysql_fetch_array($query); $Comedy = $result["Comedy"]; if ($Comedy == "") { mysql_close(); header("Location: $base_url/cat_verify.php"); die(); } ?>
  3. ok thanks Pikachu2000, the tags were always in the file im working with. this is what i have now same results all channels directed to cat_verify.php error reporting enabled no errors reported <?php $sql = "SELECT FROM videos WHERE channel = 'comedy' AND video_type = 'uploaded' OR video_type = 'embedded'"; $query = @mysql_query($sql); $result = @mysql_fetch_array($query); $comedy = $result["comedy"]; if ($comedy == "") { mysql_close(); header("Location: $base_url/cat_verify.php"); die(); } ?>
  4. it ignors the channel aswell and all channels are directed to cat_verify.php
  5. would this be more like what i need $sql = "SELECT * FROM videos WHERE channel = 'comedy' FROM video_type = 'uploaded' OR video_type = 'embedded'"; $query = @mysql_query($sql); $result = @mysql_fetch_array($query); $comedy = $result["comedy"]; if ($comedy == "") { @mysql_close(); header("Location: $base_url/cat_verify.php"); die();}
  6. hi, i have a problem with this code it should check the video table for channel name and types embedded and uploaded. if the channel name and types are confirmed it should redirect to cat_verify.php. it works in that it redirects embedded and uploaded but it completely ignors the channel. so no matter what channel the user chooses it redirects. any ideas? $sql = "SELECT FROM videos WHERE channel = 'comedy' AND video_type = 'embedded' OR video_type = 'uploaded' "; $query = @mysql_query($sql); { include_once ('cat_verify.php'); @mysql_close(); any help greatly appreciated
  7. Kansas, Ok that got me fixed up. Thank you your help is really appreciated.
  8. hi Kansas, i have tried the code every way that i can think of but it will not replace the 1 with a 0 i get a blank screen with this in the code $res = mysql_assoc($qry); when i remove it places a 1 in newfield but won't replace it with 0 any ideas?
  9. hi kansas thanks, i pasted the wrong code this is the code that sets newfield to 1. $sql = "UPDATE member_profile SET newfield = '1' WHERE user_id = $user_id"; what i would like to do is make this code check to see if newfield = 1 and if it does change newfield back to 0
  10. hi, i hope this makes sense i don't have much experience with this stuff. i have this adding a one to newfield in my database what would i need to do to make this check if newfield = 1 change newfield back to 0 $sql = "SELECT * FROM member_profile SET newfield = '1' WHERE userid = $user_id"; Many Thanks
  11. ok set it up as bool and it now takes a value of 1 in newfield but i still have to add it manualy. i still cant get the script to add a 1 at the same time that i set a member to moderator. it adds a 1 to the moderator field but not to the newfield. any ideas.
  12. hi, this is my first post, i hope someone here can give me a hand with this. i have created a new field in the member_profile table in my database. lets say i named it newfield. i would like a yes to be placed in this newfield at the same time i give moderator privlages to a member. i can manually enter a yes in newfield now with phpmyadmin. i believe this code applies the moderator settings, any ideas on a way to have this post yes in my new field as well. //make Moderator ////////////////////// if (isset($_POST['moderator']) && isset($_POST['list'])) { foreach ($_POST['list'] as $user_id) { managemember($user_id,'moderator'); } //notifications $show_notification = 1; $message = notifications(1); } any help greatly appreciated.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.