» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 45
0 members and 45 guests
No Members online
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
Web Hosting - web hosting, dedicated servers and web design services
Online Degree - search for 1000+ online degrees, online colleges & online universities.
Tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
Football Betting - best nfl betting promotions at sportsbook.com.
Oral Chelation - initial cleansing of your veins & arteries
Portatiles - Ofertas en Ordenadores y Portatiles. Increibles Ofertas DELL.

Register Now! Contact Us

About this Page
This is a discussion on Using the PHPNuke user table for SQL insert script. within the Nuke 7.x - General forums, part of the PHP-Nuke 7.x category; So, I'm converting my hardcoded site over to PHPNuke 7.8. I have a script that essentially inserts a ...


Go Back   Nukemods Forum » PHP-Nuke 7.x » Nuke 7.x - General

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-06-2006, 08:18 AM
Junior Member
 
Join Date: Dec 2004
Posts: 38
Using the PHPNuke user table for SQL insert script.
So, I'm converting my hardcoded site over to PHPNuke 7.8.

I have a script that essentially inserts a rating into a database, and it has to have a userID to do so.

I currently use the Index Login Mod to integrate my insert script with the PHPBB users table, but I'm not quite sure how I can get it working with Nuke. Suggestions?

Code:
 <?

      if (($song["songtype"] == 'S') && ($userdata['user_id'] >= 0)) {

        echo "<form name=\"theForm\" method=\"POST\" action=\"do_rating.php\">";

        echo "<input type=\"hidden\" name=\"songID\" value=\"". $song["songID"] . "\">";

      }

    ?>


       <font color="045bc1">Rating (you):</font>


       <?

          if ($userdata['user_id'] >= 0) {

            if ($song["songtype"] == 'S') {

              $db->open("SELECT song_rating.rating FROM song_rating where song_rating.songID = " . $song["songID"] . " AND song_rating.userID = " . $userdata['user_id']);

              $the_rating = $db->row();



              if ($the_rating["rating"] == null)

                $my_rating = 0;

              else

                $my_rating = $the_rating["rating"];



              InputComboRating("rating",$my_rating,0,'0, 1, 2, 3, 4, 5');

            }

            else

              echo "This cannot be rated";

          }

          else

            include("ratings/please_login_short.php");

        ?>



    <?

      if (($song["songtype"] == 'S') && ($userdata['user_id'] >= 0)) {

        echo "</form>";

      }

    ?>

</form>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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
Blog style ,add social bookmark script for phpNUKE and CMS dainbramage News 0 06-08-2007 11:26 PM
Couldn't insert row in categories table... Dwane Nuke 7.x - General 1 02-14-2006 12:48 PM
PhpNuke Upload Script jbaudio Other "stuff" 0 01-24-2005 08:28 AM
Could not insert data into users table SureFire Purged Topics 5 08-03-2003 02:08 AM
I LOVE this User Menu script! Where may I find it please?? macfionn Purged Topics 1 03-19-2003 09:12 AM


All times are GMT -5. The time now is 07:15 PM.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31