Jump to content

qwe010

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

qwe010's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i compiled under linux I[quote] tried using Visual Studio 6.0 and no errors[/quote] thin what the resault ?
  2. the error error.c: In function `average': error.c:8: error: syntax error before "i" error.c: In function `main': error.c:21: error: stray '\' in program error.c:21: error: syntax error before "n"
  3. my be Because i use this functions [code]<?php $version="v1.0"; if(phpversion() >= "4.2.0"){ if(is_array($_SERVER)){ extract($_SERVER, EXTR_PREFIX_SAME, "server"); } if(is_array($_GET)){ extract($_GET, EXTR_PREFIX_SAME, "get"); } if(is_array($_POST)){ extract($_POST, EXTR_PREFIX_SAME, "post"); } if(is_array($_COOKIE)){ extract($_COOKIE, EXTR_PREFIX_SAME, "cookie"); } if(is_array($_FILES)){ extract($_FILES, EXTR_PREFIX_SAME, "file"); } if(is_array($_ENV)){ extract($_ENV, EXTR_PREFIX_SAME, "env"); } if(is_array($_REQUEST)){ extract($_REQUEST, EXTR_PREFIX_SAME, "request"); } if(is_array($_SESSION)){ extract($_SESSION, EXTR_PREFIX_SAME, "session"); } } class Mysql { var $mysql_username; var $mysql_password; var $mysql_db; var $mysql_host; var $result_id; var $link_id; var $dbconnect; var $num_rows; var $query_count=0; function Connect() { require("config.php"); $this->mysql_username=$mysql_username; $this->mysql_password=$mysql_password; $this->mysql_db=$mysql_db; $this->mysql_host=$mysql_host; $this->link_id=mysql_connect($this->mysql_host,$this->mysql_username,$this->mysql_password); if (!$this->link_id) { echo "Unable to connect to mysql server"; } $this->dbconnect=mysql_select_db($mysql_db); if (!$this->dbconnect) { echo "Unable to select database"; } return $this->link_id; } function Query($sql) { $this->result_id=mysql_query($sql) or die(mysql_error()); $this->query_count++; return $this->result_id; return $this->query_count; } function Num_rows() { $this->num_rows=mysql_num_rows($this->result_id); return $this->num_rows; } function Free_result() { mysql_free_result($this->result_id); } function Close() { mysql_close($this->link_id); } } function Naif() { } ?>[/code]
  4. Youth  I deleted this code    [quote]\n");[/quote] Because the forum do  not accept
  5. hi all i Found  this code    i Tried to compiled it    but he show error  It needs to be some minor adjustments  [code]#include <stdio.h> #include <conio.h> float average(float ary, float count) { float tot = 0.0;         int i;         for(i = 0; i < count; i++)                 tot += ary;         return(tot / count); } int main() { printf("\n\t\t\t**************************** printf("\t\t\t**************************** printf("\t\t\t******** L-G-H Team ******** printf("\t\t\t**************************** printf("\t\t\t**************************** printf("\t\t            the result is %f\n", average(5.5, 3.5)); printf("\t\t\t        you got it :D\n\n"); printf(" press any key to exit... getch(); return 0; }[/code] please
  6. 10 $maxresults = 10; Why? What is the difference?
  7. When I open page takes a very long time    Show mistakes sometimes    And sometimes don't works      The number of loading times
  8. hi all I have a heavy script I think that the reason this code [quote]$Phpar=mysql_query("SELECT * FROM prog_script ") or die (mysql_error() ); while($M=mysql_fetch_array($Phpar)){ $file_name=$M["file_name"]; $ID=$M["ID"]; $file_wsf=$M["file_wsf"]; $file_size=$M["file_size"]; $file_ex=$M["file_ex"]; $file2=$M["file2"]; echo"<div align='center'>   <center>   <table border='1' cellspacing='1' width='100%' id='AutoNumber1' height='35'>     <tr>       <td width='16%' align='center' height='1'><span lang='en-us'>       <font face='Tahoma' size='2' color='#800000'>$file_name</font></span></td>       <td width='38%' align='center' height='1'><span lang='en-us'>       <font face='Tahoma' size='2' color='#008080'>$file_wsf</font></span></td>       <td width='10%' align='center' height='1'><span lang='en-us'>       <font face='Tahoma' size='2' color='#000080'>$file_size</font></span></td>       <td width='15%' align='center' height='1'><a href='$file_ex'>       <img border='0' src='$file_ex' alt='ÇÖÛØ Úáì ÇáÕæÑÉ áÊßÈíÑåÇ' width='108' height='60'></a></td>       <td width='11%' align='center' height='1'>       <a href='download.php?file=http://{$HTTP_HOST}{$REQUEST_URI}$file2'>       <img border='0' src='img/links.gif' width='20' height='20'></a></td>       <td width='10%' align='center' height='1'><span lang='en-us'><font face='tahoma' size='2' font color='#ff0000' ><b><S CRIPT language='JavaScript' src='download.php?downloads=http://{$HTTP_HOST}{$REQUEST_URI}$file2'></S CRIPT></span></td>     </tr>[/quote] How i can change it ? please
  9. Thanks  wildteen88      :)   It is works ok
  10. if i do it like that [quote]if(!isset($_GET['page']) == empty($_GET['page'])){     $page = 1; } else { $page = intval( $_GET['page'] ); }[/quote] and do that index.php?page=' all thing ok but if i do it like that index.php?page= You have an error in your SQL syntax how i fix that ? and my program is Shows the news like that index.php?page=1 news 1 index.php?page=2 news 2
  11. i try it but i don't know how i do it with is_numeric() i think i can but intval with [quote]if(!isset($_GET['page'])){   $page = 1;[/quote]     but how ?
×
×
  • 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.