wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
Disabling error_reporting or lowering the error level doesn't fix the issue. The problem is still there. The problem is to do with the $gid variable. Where is this variable defined?
-
How to get values from address bar to next page or file
wildteen88 replied to SUNIL16's topic in PHP Coding Help
$id should be $_GET['id'] in that code. -
Enable Image Function in PHP
wildteen88 replied to lakshitha's topic in PHP Installation and Configuration
When PHP is installed on Windows, the extensions your use must be of same version of PHP installed. For example if you have PHP5.2.6 installed but the extension you downloaded is for PHP5.2.4 it wont work. The build version has to be PHP5.2.6. You can tell the version of extension by looking at the file in windows explorer, it'll display the file name and then beneath it'll show the version number. You should also make sure the extension_dir directive points to PHP's extension folder, eg extension_dir = "C:/PHP/ext" You do not need to do any recompiling on Windows. -
Thorpe's suggestion should work. Make sure you have setup the DocumentRoot directives properly. The folders must exists first before Apache is restarted. Replace /var/www/foo.com/htdocs to where ever your sites are located, eg C:/sites/foo.com/htdocs.
-
You'll need to submit the form fields as an array, otherwise only the last form field value will be received by your script. <form> <img src="someimage" alt="sometitle"/><br /> <input type="hidden" name="imageid[]" value="2"/> <input type="text" name="title[]" /> <img src="someimage" alt="sometitle"/><br /> <input type="hidden" name="imageid[]" value="4"/> <input type="text" name="title[]" /> <img src="someimage" alt="sometitle"/><br /> <input type="hidden" name="imageid[]" value="7"/> <input type="text" name="title[]" /> <input type="submit" /> </form>
-
Drop down problem when using a function plz help
wildteen88 replied to Romeomussluv's topic in PHP Coding Help
the selected value only. -
Just looking at your code. it replies on register_globals Your should update your code so it does not reply on this setting. Your should use superglobal variables instead ($_GET, $_POST, $_COOKIE, $_SESSION etc). register_globals has been depreciated and is disabled by default for some time.
-
You may want to check this out. That shows the correct way of retrieving images stored in the database and displaying it in HTML
-
[SOLVED] is there anything like implode, but vertically?
wildteen88 replied to jaydeesmalls's topic in PHP Coding Help
Post your current code. Where does the user enter the *lines*? within a textarea? -
Drop down problem when using a function plz help
wildteen88 replied to Romeomussluv's topic in PHP Coding Help
if your drop down menu is called uname, then you use $_POST['uname'] to retrieve the value. -
First turn display_errors On and set error_reporting to E_ALL Also How are you retrieving variables set within the url in your code? eg http://www.viralhomies.net/index.php?showall=8 how is showall variables used in your page?
-
It would be helpful if you posted the link, you can post links as long as you're not advertising. Posting code which relates to the problem helps too (not the whole code for your site).
-
Its not to do with your code. Its how you're doing it. You cannot display HTML and binary data at the same time. The following will display your image <?php header("content-type:image/jpg"); require_once('conn.php'); $q = "SELECT image from images where imgid='2'"; $r = @mysqli_query ($dbc, $q); $row = mysqli_fetch_assoc($r); $news = imagecreatefromstring($row['image']); $final = imagejpeg($news); echo $final; ?> Once you start adding HTML it wont work. It would be a lot simpler to physically have the image saved on filesystem and only have the path to the image stored in your database.
-
Yes you can install packages such as WAMP (for Windows) or XAMPP (Windows and *nix) You can then test your PHP files locally. By going to http://localhost There are many guides on the internet on how to use these. Dreamwever can be setup so it automatically uploads the files to your website, as well as testing your scripts internally. This possible by setting up a Site Definition within Dreamweaver.
-
Drop down problem when using a function plz help
wildteen88 replied to Romeomussluv's topic in PHP Coding Help
There is an error in your html: That tag is left open and is interfering, it should be within the form tag. You should remove it as your displayUsersDropDown function outputs the required html for the drop down. -
better to use in_array // page name page path $pages = array( 'index' => 'includes/index.inc', 'someotherpage' => 'includes/someotherpage.inc' ); if(in_array($requested_page_var, $pages)) { include $pages[$requested_page_var]; }
-
I fail to see how. PHP is long done before JavaScript is called. If the following is your PHP script: <script type="text/javascript"> function AddCount() { <?php $i++; mysql_query("UPDATE table SET count='{$i}'"); ?> } </script> <img src="" onClick="AddCount()"> This will be the output (when you view the source code): <script type="text/javascript"> function AddCount() { } </script> <img src="" onClick="AddCount()"> When you click the image, it'll call the AddCount javascript function but nothing else will happen. Yes you can use PHP set JavaScript variables, but you cannot get JavaScript to run snippets of PHP code. The only way is AJAX. PHP is parsed server side, JavaScript is client side (web browser).
-
trying to remove partition on toshiba satellite a305-s6858 laptop...
wildteen88 replied to ardyandkari's topic in Linux
You'll have to remove Vista first, the best way would be to just reformat the hard drive, I used GParted (can be downloaded as a live-cd). XP should be able to find the drive then. -
no it wont, You cannot mix PHP and Javascript like that. The only way is AJAX.
-
Can someone tell me what I'm doing wrong here?
wildteen88 replied to dastaten's topic in PHP Coding Help
You need to use mysql_fetch_assoc $result = mysql_query($query); $row = mysql_fetch_assoc($result) $page= $row['title']; -
I am no expert, but this is to do with user groups and permissions. When PHP creates files they are owned the by the user group Apache uses (http server). Not the user group you as a user logs in to your computer as. Due to the user groups not matching (and you not being part of the Apache user group) you cannot edit the file, instead you have to login as root in order to edit it. PHP has built in functions, such as chmod and chown for changing file permissions and ownership.
-
Make sure your firewall is not blocking port 80. Also for people to access your internal site they'll need to use your WAN address (the IP address assigned by your ISP), not your LAN address (10.1.1.2)
-
$date = '19/07/2008'; $chars= str_split($date); foreach($chars as $char) { if(is_numeric($char) echo '<img src="' . $char . '.jpg" />'; elseif($char == '/') echo '<img src="slash.jpg" />'; }
-
EDIT: Thread Locked Do not post multiple topics for the same question. You have another thread here
-
You cannot display binary data/html at the same time. In order to display an image in html it has to be done through the img tag. As you have your images stored in the database, you cannot just echo the image binary data in your page and expect the image to load.