Jump to content

Search the Community

Showing results for tags 'vertical'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 3 results

  1. Hello guys, I'm having trouble making a loop to display the data in a table, I need the loop to display a table with the following data: example: 1 2 3 1 2 3 4 5 6 4 5 6 7 8 9 My code: <?php echo '<table width="100%" border="1" cellspacing="0" cellpadding="0">'; $contador = 1; while ($contador <= 10) { if($contador % 2){ for($x=0;$x<2;$x++){ echo "<tr><td>Registro $contador</td>"; } }else{ echo "<td>Registro $contador</td></tr>"; } ++$contador; } echo '</table>'; ?> Help me!
  2. Hi, here is some code for my site, where images are displayed with text underneath. It is set up in a table, but all the images and text go horizontally, and I need it to go vertically. Please help. <center> <table border="1" rules="cols" width="100%"> <tr> <? foreach($top_ratings as $key => $image) : ?> <td valign="top"><img src="http://mywebsite.com/images/<?=$image->filename?>" width="100%"/></td> <? endforeach ?> </tr> <tr> <? foreach($top_ratings as $key => $image) : ?> <td valign="top">Score: <?=$image->score?></td> <? endforeach ?> </tr> <tr> <? foreach($top_ratings as $key => $image) : ?> <td valign="top">Performance: <?=$image->performance?></td> <? endforeach ?> </tr> <tr> <? foreach($top_ratings as $key => $image) : ?> <td valign="top">Won: <?=$image->wins?></td> <? endforeach ?> </tr> <tr> <? foreach($top_ratings as $key => $image) : ?> <td valign="top">Lost: <?=$image->losses?></td> <? endforeach ?> </tr> </table> </center>
  3. I have a picture display code. But the picture is not vertically aligned and I just can't get it to work. What am I doing wrong? One of the last rules contains the vallign; print"<img src=\"$foto\" width=\"$screenW\" heigth=\"$screenH\" valign=\"middle\">"; Thanks in advance. Dave <?php include '../databaseconnectie/DBconnection2.php'; // connectie toevoegen via include if(isset($_POST['check'])){ $check = $_POST['check']; } elseif(isset($_GET['check'])){ $check = $_GET['check']; } else { $check = "";} if(isset($_POST['screenW'])){ $screenW = $_POST['screenW']; } elseif(isset($_GET['screenW'])){ $screenW = $_GET['screenW']; } else { $screenW = "";} if(isset($_POST['screenH'])){ $screenH = $_POST['screenH']; } elseif(isset($_GET['screenH'])){ $screenH = $_GET['screenH']; } else { $screenH = "";} if(isset($_POST['teller'])){ $teller = $_POST['teller']; } elseif(isset($_GET['teller'])){ $teller = $_GET['teller']; } else { $teller = "";} if(isset($_POST['cycle'])){ $cycle = $_POST['cycle']; } elseif(isset($_GET['cycle'])){ $cycle = $_GET['cycle']; } else { $cycle = "";} if(isset($_POST['seconde'])){ $seconde = $_POST['seconde']; } elseif(isset($_GET['seconde'])){ $seconde = $_GET['seconde']; } else { $seconde = "";} if(isset($_POST['eindtijd'])){ $eindtijd = $_POST['eindtijd']; } elseif(isset($_GET['eindtijd'])){ $eindtijd = $_GET['eindtijd']; } else { $eindtijd = "";} if(isset($_POST['arrayfoto'])){ $arrayfoto = $_POST['arrayfoto']; $fotoresultaat = explode("-,-,-,",$arrayfoto); } elseif(isset($_GET['arrayfoto'])){ $arrayfoto = $_GET['arrayfoto']; $fotoresultaat = explode("-,-,-,",$arrayfoto); } else { $fotoresultaat = "";} ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" /> <?php if($check == "" && $teller==""){ ?> <form name="detect" method='post' action=" <?php echo $_SERVER['PHP_SELF']; ?>"> <input type='hidden' name='screenW' value='screenW'/> <input type='hidden' name='screenH' value='screenH'/> <input type='hidden' name='check' value='check'/> </form> <SCRIPT language="javascript"> var screenW = 640, screenH = 480; var Check = "check"; if (parseInt(navigator.appVersion)>3) { screenW = screen.width; screenH = screen.height; } else if (navigator.appName == "Netscape" && parseInt(navigator.appVersion)==3 && navigator.javaEnabled() ) { var jToolkit = java.awt.Toolkit.getDefaultToolkit(); var jScreenSize = jToolkit.getScreenSize(); screenW = jScreenSize.width; screenH = jScreenSize.height; } window.document.detect.screenW.value=screenW; window.document.detect.screenH.value=screenH; window.document.detect.check.value=Check; window.document.forms['detect'].submit(); </SCRIPT> <?php } $tijd = time(); if($teller ==""){ $result = mysql_query("SELECT * FROM opdrachten WHERE starttijd < '$tijd' AND eindtijd > '$tijd' AND type = 'foto'") or exit(mysql_error()); while ($row = mysql_fetch_array($result)) { $fotoresultaat[] = $row['bestand']; $leeg = "iets"; $starttijd = $row['starttijd']; $eindtijd = $row['eindtijd']; $cycle = "nee"; $seconde ="10"; $teller=0; } } if($cycle=="nee"){ $aantal = count($fotoresultaat); if($tijd<$eindtijd){ if($teller < $aantal){ $foto = $fotoresultaat[$teller]; $teller++; $arrayfoto = implode('-,-,-,',$fotoresultaat); print "<meta http-equiv=\"refresh\" content=\"$seconde;URL=fotoshow.php?teller=$teller&&eindtijd=$eindtijd&&cycle=$cycle&&seconde=$seconde&&arrayfoto=$arrayfoto&&screenW=$screenW&&screenH=$screenH\" />"; }else{ $foto = $fotoresultaat[0]; $teller=1; $arrayfoto = implode('-,-,-,',$fotoresultaat); print "<meta http-equiv=\"refresh\" content=\"$seconde;URL=fotoshow.php?teller=$teller&&eindtijd=$eindtijd&&cycle=$cycle&&seconde=$seconde&&arrayfoto=$arrayfoto&&screenW=$screenW&&screenH=$screenH\" />"; } }else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=../index.php\" />"; } } elseif($cycle == "ja"){ } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=../index.php\" />"; } ?> <title>Image</title> <?php ?> <style type="text/css"> html { overflow-x: hidden; overflow-y: auto; background-color : orange; } img{ margin-left: -8px; margin-top: -8px; align : center; } </style> </head> <body> </body> </html> <?php if($cycle !=""){ print"<img src=\"$foto\" width=\"$screenW\" heigth=\"$screenH\" valign=\"middle\">"; } ?> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.