UBB.Dev
Posted By: Zarzal How to generate a correct showprofilöe link ? - 02/08/2005 3:06 AM
I have an older selfmade add on. Now the server was changed and run latest mySQL and php. My script doesnt work anymore. Here is what I use long time ago:

Code
<?<br />    while ($line = mysql_fetch_array($result)) {<br />      $optic="lighttable";<br />      $suchmich = $line[forumname];<br />      include ("../config/db2.php");<br />      $query = "SELECT * FROM w3t_Users WHERE U_Username = '$suchmich'";<br />      $result1 = mysql_query($query);<br />      $line1 = mysql_fetch_array($result1);<br />      $dienummer = $line1[U_Number];<br />      mysql_free_result($result1);<br />      mysql_close();<br />  ?><br />    <tr class="<?echo $optic;?>"><br />      <td NOWRAP WIDTH="10%"><b><font size="1"><A HREF="http://www.dragonclan-forum.de/ubbthreads/showprofile.php?Cat=&User=<?echo $dienummer?>&page=1&what=showmembers" TARGET="_blank"><?=$line[forumname]?></A></font></td><br />....<br />


I have to comment out the following lines to bring up my script without errors but the link isnt generated properly:

#$line1 = mysql_fetch_array($result1);
$dienummer = $line1[U_Number];
#mysql_free_result($result1);
#mysql_close();

what can I do ?
no one ?
Things like this
[forumname]
should be
['forumname']

Email me the script, I will fix it for you.
ok, done. But everytime I remove the # in front of
#$line1 = mysql_fetch_array($result1);
I get this error:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /..../memberlist.php on line xxx

I have no php skill

/edit. I found some resources on the web and will do some debug. I hope I fond whats going on and will come back later.

/edit 2: Fixed , found, now I going to shoot the coder They select the wrong database.
© UBB.Developers