Jump to content

webdevised

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

webdevised's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i have a band show CMS that connects to a DB. in the admin panel I have the code that displays the show venue and with the modify link only.. i don't want the whole venue name displayed all i want is 10 letters of it to be displayed.. can this be done? this is the admin show view code: [code=php:0] <?php include("config.php");               $db = mysql_connect($dbhost,$dbuser,$dbpass);               mysql_select_db($dbname) or die("Cannot connect to database");               $query = "SELECT * FROM band_shows ORDER BY id";               $result = mysql_query($query);                 echo "<ul>\n";                 while ($r = mysql_fetch_array($result)) {                   echo "<li><a href=\"admin.php?page=newsmodify&amp;id=$r[id]\">$r[venue]</a></li>\n";                 }                 echo "</ul>\n"; ?> [/code] thanks....
  2. i know that way.. i want to have only one file... i would like to use  [code]if ($_GET['page'] == 'install')[/code] code... you know??
  3. hello everyone.. i am new to PHP and i have a quick questions.. how do i code a page that have more then one page in it... like in the install page it first says ""would you like to install. if so, click install below"" then have the "install" link go to the install part on the same page... but after you click install button the first statement goes away and the new one comes up that says blah blah tables have been created... i know how to install the table code.. i just don't have to have two install files.... and ideas??
  4. this is the view page.... [code]<?php include("pwp.php"); ?> <? include("dbinfo.inc.php"); mysql_connect($host,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM contacts ORDER BY id ASC"; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); ?> <table border="0" cellspacing="2" cellpadding="2"> <tr> <th><font face="Arial, Helvetica, sans-serif">Name</font></th> <th><font face="Arial, Helvetica, sans-serif">Phone</font></th> <th><font face="Arial, Helvetica, sans-serif">Mobile</font></th> <th><font face="Arial, Helvetica, sans-serif">Fax</font></th> <th><font face="Arial, Helvetica, sans-serif">E-mail</font></th> <th><font face="Arial, Helvetica, sans-serif">Website</font></th> <th><font face="Arial, Helvetica, sans-serif">&nbsp;</font></th> </tr> <? $i=0; while ($i < $num) { $id=mysql_result($result,$i,"id"); $first=mysql_result($result,$i,"first"); $last=mysql_result($result,$i,"last"); $phone=mysql_result($result,$i,"phone"); $mobile=mysql_result($result,$i,"mobile"); $fax=mysql_result($result,$i,"fax"); $email=mysql_result($result,$i,"email"); $web=mysql_result($result,$i,"web"); ?> <tr> <td><font face="Arial, Helvetica, sans-serif"><? echo "$first $last"; ?></font></td> <td><font face="Arial, Helvetica, sans-serif"><? echo "$phone"; ?></font></td> <td><font face="Arial, Helvetica, sans-serif"><? echo "$mobile"; ?></font></td> <td><font face="Arial, Helvetica, sans-serif"><? echo "$fax"; ?></font></td> <td><font face="Arial, Helvetica, sans-serif"><a href="mailto:<? echo "$email"; ?>">E-mail</a></font></td> <td><font face="Arial, Helvetica, sans-serif"><a href="<? echo "$web"; ?>">Website</a></font></td> <td><font face="Arial, Helvetica, sans-serif"><a href="update.php?id=<? echo "$id"; ?>">Edit</a>&nbsp;&nbsp;&nbsp;<a href="delete.php?id=<? echo "$id"; ?>">delete</a></font></td> </tr> <? ++$i; } echo "</table><BR /><br /><a href=\"add.php\">Add Info</a>&nbsp;|&nbsp;<a href=\"pwp.php?logout\">logout</a>"; ?> [/code]
  5. I made this CMS that would allow a band to login and update their show list. The problem I am having is that after they have updated their show list and then use the link to go to the page that displays the shows the page is not updated.. I have to it the refresh button to have the new shows displayed. What am I doing wrong?? I am using PHP and MYsql, thanks - BRad
×
×
  • 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.