Welcome to Geeklog, Anonymous Friday, November 29 2024 @ 07:54 am EST

Geeklog Forums

phb_block


sidimustafa

Anonymous
confused
Hi guys,

i'm running geeklog 1.3.11sr1,

i received a piece of php code from a buddy of mines
i want to paste it in a block
my php knowledge is 0.00

but with all the information i gathered from this site, i learnt how to add php codings to blocks, and so far it went great

what i did so far, is add the code giving to the lib-custom.php file, name it
function phpblock_mini

and made sure all coding was copied correctly

i then created the block,
tell it the name was phpblock_mini

saved it, Banging your head and well, i had no more website, my website no longer open,
until i open the lib-custom.php removed the added coding, and then it worked; my website was then displayed,

i don't know what i did wrong, don't even know if the coding is correctly coded for the lib-custom.php.

but here is the code, can someone please guide me along the right track, to get this piece of coding in a block.

thnks

Text Formatted Code

<form action="req.php?songID=()" method="GET" target="2">


<select name="songID" size="1" >

<? include("config.php"); ?>


<OPTION SELECTED VALUE="NONE">-- Choose a song and click the Request button! --</OPTION>


<?
$query = "SELECT * FROM songlist GROUP BY artist, title";
$res = mysql_query($query);

while ($song = mysql_fetch_array($res)) {
?>

<option value="<? echo $song["ID"]; ?>"><?= $song['artist'] ?> - <?= $song['title'] ?></option>

<?
}
?>
</select>



<input type=Submit value="REQUEST">
</form>

<center><iframe name="2" src="req.php" width="100%" height="80%"></iframe>

 

 Quote

All times are EST. The time is now 07:54 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content