Jump to content

Search the Community

Showing results for tags 'php echo'.

  • 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 2 results

  1. this is my php code for my profile.php. it is to display the users name after login. <?php session_start(); require "connect.php"; if($_SESSION['name']) { $name = $_SESSION['name']; $query = mysql_query("SELECT name FROM register WHERE name ='$name'"); $numrows = mysql_num_rows($query); if(1 == $numrows) { while ($rows = mysql_fetch_assoc($query)) { echo "Welcome, ".$rows['name']."!"; } } } ?> i want to display this: while ($rows = mysql_fetch_assoc($query)) { echo "Welcome, ".$rows['name']."!"; } between some html. ive tried but it isnt working. this is the code i did: <?php if(1 == $numrows) { ?><?php while (@$rows = mysql_fetch_assoc(@$query))?><h3><?php echo "Welcome, ".@$rows['name']; ?><?php }?> i tried: <?php while (@$rows = mysql_fetch_assoc(@$query))?><h3><?php echo "Welcome, ".@$rows['name']; ?> but both doesnt work. as in only "Welcome, " is displayed in my page. any pointers is much appreciated!
  2. Hello i am getting nothing printed on the page using this code, just a blank page is showing. Can any body help me out from this issue : <?php if (!ini_get("register_globals")) { import_request_variables('GPC'); } //E?C?? ??I C?E? CEO E? $phpver = phpversion(); if ($phpver < '4.1.0') { $_GET = $HTTP_GET_VARS; $_POST = $HTTP_POST_VARS; $_SERVER = $HTTP_SERVER_VARS; } $phpver = explode(".", $phpver); $phpver = "$phpver[0]$phpver[1]"; if ($phpver >= 41) { $PHP_SELF = $_SERVER['PHP_SELF']; } class Pager { function getPagerData($numHits, $limit, $page) { $numHits = (int) $numHits; $limit = max((int) $limit, 1); $page = (int) $page; $numPages = ceil($numHits / $limit); $page = max($page, 1); $page = min($page, $numPages); $offset = ($page - 1) * $limit; $ret = new stdClass; $ret->offset = $offset; $ret->limit = $limit; $ret->numPages = $numPages; $ret->page = $page; return $ret; } } // get the pager input values $page = $_GET['page']; $limit = 50; $result = mysql_query("select count(*) from dada where category='Music'"); $total = mysql_result($result, 0, 0); // work out the pager values $pager = Pager::getPagerData($total, $limit, $page); $offset = $pager->offset; $limit = $pager->limit; $page = $pager->page; // use pager values to fetch data $query = "select * from dada order by id DESC category='Music' limit $offset, $limit"; $result = mysql_query($query); $num=mysql_numrows($result); ?> <?php $i=0; while ($i<$num) { $id=mysql_result($result,$i,"id"); $name=mysql_result($result,$i,"name"); $image=mysql_result($result,$i,"image"); $category=mysql_result($result,$i,"category"); $linkdown=mysql_result($result,$i,"linkdown"); $pubsite=mysql_result($result,$i,"pubsite"); $description=mysql_result($result,$i,"description"); $os=mysql_result($result,$i,"os"); echo "<b><u><font size=\"4\">$name</font></u></b><br><font size=\"3\">$description</font><br><a href=\"$pubsite\" rel=\"nofollow\"><font color=\"#060d45\"><b>Publisher WebSite</b></font></a> <a href=\"$linkdown\" rel=\"nofollow\"><font color=\"#060d45\"><b>Download</b></font></a> <hr>"; $i++ ; } ?> music.php
×
×
  • 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.