Search found 10 matches

by mcandrey
Wed Apr 16, 2003 12:36 am
Forum: PHP coding => General
Topic: Search module for a website
Replies: 1
Views: 689

Search module for a website

Dear all,
Can you suggest me from where I can get a search module/page for the information in my site. From where you get a cool code with a great documentation?!?

Thx. a lot in advance.
by mcandrey
Tue Mar 25, 2003 11:27 pm
Forum: PHP coding => Images
Topic: Display a image stored in a database
Replies: 2
Views: 1793

I use a large library with *.jpgs and, of course, I use a admin page to manipulate these. So, I thought that is a good ideea to store the *.jpgs in the database.

For what is longblob field dedicated? ... please let me have your recomandation pages/urls.

thx in advance
by mcandrey
Tue Mar 25, 2003 8:10 am
Forum: PHP coding => Images
Topic: Display a image stored in a database
Replies: 2
Views: 1793

Display a image stored in a database

I use the folowing code to display a picture stored in a database in a long blob field: <?php $x=mysql_connect("localhost","root",""); mysql_select_db ("pic"); $q = "select CODE,PICT from test where CODE = '001'"; $qexec = @mysql_query($q) or die("Couldn't get image."); $img = @mysql_result($qexec,0...
by mcandrey
Tue Mar 25, 2003 7:36 am
Forum: mySQL & php coding
Topic: Validating user input.
Replies: 2
Views: 1306

<script> function vercimpx(cimpx) { var key=cimpx.keyCode; if((key>47 && key<58) || (key>95 && key<106) || (key>111 && key<124) || (key==46) || (key==27) || (key==9)) return true; else alert("Bad value ... please insert a number here!"); return false; } </script> please visit w
by mcandrey
Tue Mar 25, 2003 6:33 am
Forum: PHP coding => General
Topic: populating a combo from database
Replies: 2
Views: 1051

First of all please note that is not recomended to populate a combo or any other form element with such many records .... maybe up to 30 is more than enough.

I think that is not possible to submit a form and to not make a requery
by mcandrey
Tue Mar 25, 2003 4:33 am
Forum: PHP coding => General
Topic: does fopen() never stop trying to open a file ? (on a server
Replies: 1
Views: 997

or:

<?php
error_reporting(E_ALL);

/* Add redirection so we can get stderr. */
$fp = popen('x.php', 'r');
echo "'$fp'; " . gettype($fp) . "\n";
$read = fread($fp, 2096);
echo $read;
pclose($fp);
?>
by mcandrey
Tue Mar 25, 2003 4:31 am
Forum: PHP coding => General
Topic: does fopen() never stop trying to open a file ? (on a server
Replies: 1
Views: 997

try socket_set_timeout
by mcandrey
Tue Mar 25, 2003 4:22 am
Forum: PHP coding => General
Topic: Fatal error: Cannot redeclare...
Replies: 1
Views: 698

i use the folowing code for a connection to a database: <?php /* Connecting, selecting database */ $link = mysql_connect("localhost", "root", "") or die("Could not connect"); //echo "Connected successfully"; mysql_select_db("cltbooking") or die("Could not select database"); ?> which is inserted in a...
by mcandrey
Tue Mar 25, 2003 4:17 am
Forum: PHP coding => General
Topic: View file name
Replies: 2
Views: 1563

... or you can use the folowing:

basename($HTTP_SERVER_VARS['REQUEST_URI'])
by mcandrey
Tue Mar 25, 2003 4:08 am
Forum: PHP coding => General
Topic: weird characters
Replies: 1
Views: 690

I tried the folowing code:

<?
$site_name = "VictoriaGarageSales.ca";
echo $site_name;
?>

on win32 and linux platform and the result was :
VictoriaGarageSales.ca

please let me know more details