Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP
Author Message
Achaean
Regular
Regular



Joined: Mar 22, 2004
Posts: 64
Location: Missouri, USA

PostPosted: Mon Sep 06, 2004 7:50 pm Reply with quote

Hey guys Im back, got a question, just want some simple code to add to a php index, for a basically a button that can say return to home page or something heres the code,

Code:
<?php


/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* Based on php Addon Feedback 1.0                                      */
/* Copyright (c) 2001 by Jack Kozbial                                   */
/* http://www.InternetIntl.com                                          */
/* [ Only registered users can see links on this board! Get registered or login! ]                                                */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die ("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));


/**********************************/
$index = 1;
$subject = "$sitename - Event Sign Up";
/**********************************/

include("header.php");

if ($cookie[1] != "") {
    $sql = "SELECT name, username, user_email FROM ".$user_prefix."_users WHERE user_id='$cookie[0]'";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    if ($row[name] != "") {
   $sender_name = $row[name];
    } else {
   $sender_name = $row[username];
    }
    $sender_email = $row[user_email];
}

OpenTable();
$sql = "SELECT ei, pn FROM ".$user_prefix."_events_players WHERE ei='$event_id'";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
   $ei = $row[ei];
   $pn = $row[pn];
   if ($event_id = $ei) {
       if ($username == $pn)  $okay = 2;
   }
   else $okay = 1;
   }
   if ($okay == 1) {
   sql_query("INSERT INTO ".$user_prefix."_events_players VALUES ('$event_id','$username','')", $dbi);
   echo "<table><tr><td><b>Thank-you $username. Sign up successful for match vs. $opponent!</b></td></tr></table>";
 }
 else {
   sql_query("INSERT INTO ".$user_prefix."_events_players VALUES ('$event_id','$username','')", $dbi);
    echo "<table><tr><td><b>Thank-you $username. Sign up successful for match vs. $opponent!</b></td></tr></table>";
    }
CloseTable();   
include("footer.php");

?>

_________________
[ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
GanjaUK
Life Cycles Becoming CPU Cycles



Joined: Feb 14, 2004
Posts: 633
Location: England

PostPosted: Mon Sep 06, 2004 8:27 pm Reply with quote

Code:


echo "<form method="get" action="index.php"><input type="submit" name="submit" value="Return Home"></form>";

_________________
Image
Need a quality custom theme designed? PM me!
 
View user's profile Send private message Visit poster's website
Achaean







PostPosted: Mon Sep 06, 2004 8:45 pm Reply with quote

aye but where in the code do I put this again?
 
GanjaUK







PostPosted: Mon Sep 06, 2004 9:01 pm Reply with quote

I have no idea where you need the button. That info would help a lot. Wink
 
Achaean







PostPosted: Mon Sep 06, 2004 9:02 pm Reply with quote

at the bottom of the text hehe, perhaps a <br> or two below the final text.
 
GanjaUK







PostPosted: Mon Sep 06, 2004 9:05 pm Reply with quote

ugh, what text? If you mean under the current module, then I would add it in theme.php above the footer.
 
Achaean







PostPosted: Mon Sep 06, 2004 9:24 pm Reply with quote

under the Thank-you $username. Sign up successful for match text that will be shown on the page.
 
GanjaUK







PostPosted: Mon Sep 06, 2004 9:45 pm Reply with quote

I thought you wanted this button on all pages.
Just put a <br> in after the text then add the button code.

Code:
<b>Thank-you $username. Sign up successful for match vs. $opponent!</b><br><form method=\"get\" action=\"index.php\"><input type=\"submit\" name=\"submit\" value=\"Return Home\"></form>
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©