EzPortal - Portal Software for Forums

EzPortal - Made to Fit Your SMF Forum - Glad You Found Us!
+- +-

UserBox

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Recent Posts

Re: How to remove the SMF menu on top of the portal by VSD
November 04, 2020, 11:02:52 pm

Re: How to remove the SMF menu on top of the portal by EzPortal
November 04, 2020, 09:29:10 pm

Re: How to remove the SMF menu on top of the portal by VSD
November 04, 2020, 08:17:14 pm

Re: How to remove the SMF menu on top of the portal by EzPortal
November 04, 2020, 07:57:05 pm

How to remove the SMF menu on top of the portal by VSD
November 04, 2020, 07:43:18 pm

Minor Update for SMF 2.1.x by EzPortal
October 18, 2020, 09:33:09 am

Re: EzPortal unable to be seen by user with primary custom usergroup by EzPortal
October 12, 2020, 07:55:08 am

EzPortal unable to be seen by user with primary custom usergroup by radi27
October 11, 2020, 04:46:32 pm

+- HTML Menu


Sample HTML Block Usage - You May Custom Code it, as needed!

Author Topic: PHP MySQL Script  (Read 7997 times)

0 Members and 1 Guest are viewing this topic.

Offline Tyrantis

  • Posts: 3
  • Karma: 0
  • Gender: Male
PHP MySQL Script
« on: December 16, 2009, 06:50:00 pm »
I built this script for use, and works fine as a file hitting it from the server. But in an EZblock it seems to not hit the database and displays the variable names rather than the actual database information.

Code: [Select]
<?php

//Script to display applicants.

//database to use
$db_name "firespr_members";
//table to use
$table_name "application";

//connection info
$connection = @mysql_connect("localhost""username""wouldn't you like to know")
or die(mysql_error());

//establish the connection to database
$db = @mysql_select_db($db_name$connection) or die(mysql_error());

$sql "SELECT * FROM $table_name ORDER BY id";

$result = @mysql_query($sql,$connection) or die(mysql_error());

while (
$row mysql_fetch_array($result)) {

$id $row['id'];
$character stripslashes($row['character']);
$real_name stripslashes($row['real_name']);
$forum_name stripslashes($row['forum_name']);
$address stripslashes($row['address']);
$city stripslashes($row['city']);
$state stripslashes($row['state']);
$zip stripslashes($row['zip']);
$country stripslashes($row['country']);
$other_clubs stripslashes($row['other_clubs']);
$armor_type stripslashes($row['armor_type']);
$armor_class stripslashes($row['armor_class']);
$region stripslashes($row['region']);
$email stripslashes($row['email']);
$joined stripslashes($row['joined']);
$birth stripslashes($row['birth']);
$is_18 stripslashes($row['is_18']);
$read_codex stripslashes($row['read_codex']);







$display_block "<p>
<br><br>
<strong>Email: </strong> 
$email <br>
<strong>Character: </strong> 
$character <br>
<strong>Real Name: </strong> 
$real_name <br>
<strong>Forum Name: </strong> 
$forum_name <br>
<strong>Address: </strong> 
$address <br>
<strong>City: </strong> 
$city <br>
<strong>State: </strong> 
$state <br>
<strong>Zipcode/Postal Code: </strong> 
$zip <br>
<strong>Country: </strong> 
$country <br>
<strong>Other Clubs: </strong> 
$other_clubs <br>
<strong>Armor Type: </strong> 
$armor_type <br>
<strong>Armor Class: </strong> 
$armor_class <br>
<strong>Region: </strong> 
$region <br>
<strong>18 or Older: </strong> 
$is_18 <br>
<strong>Read Codex: </strong> 
$read_codex <br>
<strong>Applied On or Last Edit: </strong> 
$joined <br>
<strong>Birthdate: </strong> 
$birth <br>
<strong><a href=\"appimage.php?id=
$id&image=image1\"> Image1 </a></strong><br>
<strong><a href=\"appimage.php?id=
$id&image=image2\"> Image2 </a></strong><br>
<strong><a href=\"appimage.php?id=
$id&image=image3\"> Image3 </a></strong><br>
<strong><a href=\"appimage.php?id=
$id&image=image4\"> Image4 </a></strong><br>
<strong><a href=\"appimage.php?id=
$id&image=image5\"> Image5 </a></strong><br>

</p>"
;

echo "$display_block";

}



?>


Any thoughts would be appreciated.

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1229
  • Karma: 66
Re: PHP MySQL Script
« Reply #1 on: December 16, 2009, 06:54:50 pm »
Are you putting in a php block?
If so try removing the <?php and ?> and just put the code.
Like ezPortal? Support me at https://www.patreon.com/vbgamer45/

Offline Tyrantis

  • Posts: 3
  • Karma: 0
  • Gender: Male
Re: PHP MySQL Script
« Reply #2 on: December 16, 2009, 06:57:02 pm »
No using the page manager. Sorry I am kind of writing for this groups site, and don't use EZportal myself. So probably used wrong terms.

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1229
  • Karma: 66
Re: PHP MySQL Script
« Reply #3 on: December 16, 2009, 07:23:20 pm »
The page manager does not support php code at this time only html
Like ezPortal? Support me at https://www.patreon.com/vbgamer45/

Offline Tyrantis

  • Posts: 3
  • Karma: 0
  • Gender: Male
Re: PHP MySQL Script
« Reply #4 on: December 16, 2009, 07:36:05 pm »
That explains things, thank you so much.

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
20068 Views
Last post January 11, 2013, 12:25:40 pm
by EzPortal

+-SMF Gallery

Quick Menu



Members Online

23 Guests, 0 Users
Powered by EzPortal