mpharo
Members-
Posts
221 -
Joined
-
Last visited
Never
Everything posted by mpharo
-
theres not gonna be much you can do for that being that you need to call the flash file with html....unless you can embed it in some kind of javascript to generate the object....
-
try using the <?php require_once('filename.php'); ?> function....
-
What you need to do is check for the characters after the extension delimiter...so you would return everything after the last instance of a period. This is then your extension you then compare it to the list of acceptable file extensions then upload it or reject.
-
then your not gonna find much help here with out being able to troubleshoot the code your using....
-
prolly need to see your code....
-
That is prolly an issue with your Yahoo account...
-
What I would do is generate a PHP session variable and then insert that into the database along with the IP and Date/Time...So every time a new session is started on your site it is considered a new hit...you then record the IP address and you can get 2 pieces of information from this....You query for unique ip addresses for unique hits for a period of time and then you can query for the session variable to get how many total hits or how many total hits for a unique IP address for a given time...Although the sessions can still be abused, you can filter them out with the unique IP addresses....
-
How to view index.php in html code ? Please advice,thanks.
mpharo replied to moneytree's topic in PHP Coding Help
There is also a .phps extension that you can use for your files to get only the code displayed on the page in the color coded markup... -
Dynamic Image won't display from MySQL, shows up as random symbols. HELP!
mpharo replied to czs's topic in PHP Coding Help
the advantage of storing it into the database allows for easy uploading of files to the server using much less disk space and no need for file management on the server filesystem....if that is what the intended use is for... -
Dynamic Image won't display from MySQL, shows up as random symbols. HELP!
mpharo replied to czs's topic in PHP Coding Help
<?php $id = $_GET['imageID']; ?> is at the top of imagepage.php.....the GET is not populated yet so $id has no value....whereas if you have imagepage2.php inside of your <img src> tag you are requesting a new page with the url already inside of it....check this.... imagepage.php <?php session_start(); echo $_SESSION['MM_Username'] ?> <?php require_once('Connections/connPFD.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $colname_rspicture = "-1"; if (isset($_SESSION['MM_username'])) { $colname_rspicture = $_SESSION['MM_username']; } mysql_select_db($database_connPFD, $connPFD); $query_rspicture = sprintf("SELECT * FROM tblprofile WHERE email = %s", GetSQLValueString($colname_rspicture, "text")); $rspicture = mysql_query($query_rspicture, $connPFD) or die(mysql_error()); $row_rspicture = mysql_fetch_assoc($rspicture); $totalRows_rspicture = mysql_num_rows($rspicture); ?><!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=utf-8" /> <title>Untitled Document</title> </head> <body> <p> <img src="imagepage2.php?imageID=$row_rspicture(???????)"> </p> </body> </html> <?php mysql_free_result($rspicture); ?> imagepage2.php <?php $id = $_GET['imageID']; $getImage = mysql_query("SELECT picture FROM profile WHERE imageID='$id'"); $imageData = mysql_result($getImage,0,0); header('Content-type: image/jpeg'); // tell browser what type of file this is. header('Content-Disposition: inline; filename="picture.jpg"'); // send the file name to the browser. echo $imageData; //output the blob of data that the browser now knows is an image ?> -
Dynamic Image won't display from MySQL, shows up as random symbols. HELP!
mpharo replied to czs's topic in PHP Coding Help
Well since you have it all on the same page then you need to feed the url with the GET request to it already, otherwise the GET is empty, whereas if you feed it in from another page like micah1701 said your calling the source from that page with the variable from this page.... -
Dynamic Image won't display from MySQL, shows up as random symbols. HELP!
mpharo replied to czs's topic in PHP Coding Help
I am assuming your storing your image in the database as a blob? -
PHP Gallery is a nice tool that ive used..... http://gallery.menalto.com/ Very easy setup and can be customized to your liking....
-
lets see your code for the textarea and an example of the output code....
-
try this and see if you get an error...
-
Hello, I have a question. I have a site that i am building search functionality into. The table is about 200 records and wont grow ever passed that and shrinks over time but will never go over 200. Is it worth it to do Full Text Indexing or should I just use a LIKE query then explode the variable to search for each keyword? Thanks,
-
that really depends on your format of your date field. You have the general idea, but just use the format that you have in the field to get the proper results.
-
I would do it all in one query and then put it into an array and then extract the results from the array.
-
Joomla is very easy to use...as well as Mambo, PHP-Nuke, e107, there are many of them out there if you search on sourceforge.net...
-
I am assuming you mean the client computer name?? If so PHP is a server side language and does not have a way of telling what is connected to it without some help from Javascript and a little messy code.
-
session_start() must be called before you can use any session functions.
-
<?php $select=mysql_query("SELECT * FROM offices WHERE username='$username' ") or die(mysql_error()); while($sql=mysql_fetch_array($select)) { echo "Username: $sql[username]" . "Offices: $sql[offices]"; } ?> just do the same thing for each table and keep giving each variable a unique name. You can also do it with a more complicated query using joins...
-
you just need to query for that information for each table and then display it...im not sure what else your asking for? maybe post a little bit of code so we can see what your dillema is??