39,326 Topics
| |
i need help with preg_match i have [CODE] if (!preg_match('/^[a-zA-Z0-9-_]/', $filename) ) { print $error=... }else{ upload... [/CODE] How to improve the preg_match so i can use only a-zA-Z0-9 and this special characters "-_" nothing more. because as i did it when i have file with name abc def.pdf for … | |
is it possible to import say 10 excel files into DB at once? like in PhpMyAdmin, I go and import each file one by one and they are added as new tables. is there some kind of php code I can write to take all files in X folder and … | |
i have been looking everywhere for an answer to this and i still havent found one that works what i want to be able to do is display the details of the user that is logged in but instead it shows the whole database here is my code: [CODE=php]<?php require('authenticate.php'); … | |
I'm receiving an 'undefined index' error when calling a new window and I can't quite figure out why. Seems to me like the variable is not being passed, or holds no value, and again I can't figure out why. I use an identical code for 'state' with no issues. Here … | |
Hi We have a lot of fan pages in facebook and Each page has its own subdomain for example: [url]http://page1.mysite.com/1.php[/url] [url]http://page2.mysite.com/2.php[/url] [url]http://page3.mysite.com/3.php[/url] "1 SSL will cover one domain and any sub-directories which you install;- but it will not cover sub-domains, each sub-domain would also require its own SSL" from october … | |
Hi. I'm trying to write a simple scheduling script, but have run into a problem. I'm fairly new to PHP, and so have no idea how to update multiple rows in a mysql database. Currently, my code connects to the database and reads each row. If "class" is empty, it … | |
Hi. I’m creating a system for my client where he goes to a page where he types in a letter. The text is saved as a file (preferably PDF) and then sent as an email to a printing service. I’d prefer not to save multiple PDFs on my server, so … | |
| Hi, I am new to PHP and need help with my code to create files and folders based on variable values. Here's the setup: 1. I have approximately 100 categories. I've assigned a variable to each category. E.g. [LIST] [*]Variable 1 (as in $c1) contains category one's name. [*]Variable 2 … |
Hey there I'd appreciate some help with variables please. I have a search function on a site I'm building and would like to have it so that a user can click on a search result to see more columns from that row on the db, if you see what I … | |
Hi, I have the following code to edit a .txt file, but it says there is an error on line 34, I am not sure what it is. Also there are bound to be other problems with the code, so please feel free to point them out. [CODE]<? if ($_POST['pw']!="") … | |
Errors: imagepng(): supplied argument is not a valid Image resource in /home/publicr/public_html/dynsigs/anything.php on line 29 Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/publicr/public_html/dynsigs/anything.php on line 29 PHP: [CODE] <php><?PHP function sql_sanitize( $sCode ) { if ( function_exists( "mysql_real_escape_string" ) ) { // If PHP version > … | |
i have a little form with a select list, and i am submitting the form every time i select an item. the problem is that, after selecting a value and submitting the form, the selected item doesn't remain selected. Is there any method to keep the selected item selected in … | |
So I have this code: [code]<html> <head> <style type="text/css"> <!-- a:link {color: #000000; text-decoration: underline; } a:active {color: #0000ff; text-decoration: underline; } a:visited {color: #000000; text-decoration: underline; } a:hover {color: white; text-decoration: none; } --> </style></head> <body background="img/bg3 .jpg"> <font face=Verdana size=2> <b>Login</b><br><br> <form action="plogin.php" method="GET"> Username:<input type="text" name="cust_uname"><br><br> Password:<input … | |
I have some really big problems changing the appearences of my urls.. Cant seem to get this to work: I want to change this url: [url]http://www.enkelt-webdesign.dk/index.php?sid=1&titel=FORSIDE[/url] Into this url: [url]http://www.enkelt-webdesign.dk/Forside[/url] I have tried many things in my .htacess file now, and just dont get the desired result. This is what … | |
This isn't really a PHP question but I couldn't find the right place for it. I'm getting these strange characters -  - in my source code before the Doctype tag. I've encountered this before when working in Notepad++ using ANSI as UTF-8 or similar formats with BOM for encoding. … | |
Hello every one, i am an seo person but i want to learn php too as a beginner. so please advice me some helpful techniques to learn it from the beginning. thank you | |
I try to install smarty and when I write the require code I cannot find the path [CODE] require_once ('d:/wamp/bin/php/php5.3.5/Smarty-3.0.8/Smarty.class.php'); [/CODE] or if you could tell me which is the correct syntax in the ini.php page. Thanks | |
is it possible for me to send SMS by using PHP code ?? If yes, could anyone guide me how can i do so ?? Thanks | |
I'm a newbie in PHP, I have a dynamic textbox which looks like these name="name1" name="name2" name="name3" the number of fields depends on how many user wants but the problem is on the SQL script, I need to put the $ctr besides "$_POST[name]" in order for the compiler see all … | |
Hello, I have a new website that I have created, and when I test it and submit the contact form I get this error: Warning: Cannot modify header information - headers already sent by (output started at /home/breadan1/public_html/clunyanimaltrust.za.org/index.php:7) in /home/breadan1/public_html/clunyanimaltrust.za.org/content/fgcontactform.php on line 143 I googled it, tried everything that I … | |
where can i find information about creating a Website Manger of content? kinda like wordpress but simple | |
I have been so stupid to hit go at the bottom after I added a new user, deleting all users including root. I have re-installed xampp twice, tried to change the password via the xampp security, still with no success. xAmpp loads perfect on [url]http://localhost[/url], phpMyAdmin though shows the following … | |
[ICODE]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-userfile WHERE id='642' AND userid='459'' at line 1[/ICODE] This is the code [ICODE] $query = "SELECT * FROM ue-userfile WHERE id='$imageid' AND userid='$userid'"; $result = … | |
| I've been working PHP in Dreamweaver. I've stumbled upon a problem though, the webpage itself runs smoothly in Internet Explorer 6.0, but when I try Firefox, Chrome, Safari, or even the latest IE version, it has certain errors such as not scrolling through the page, certain images jack into others … |
I have this while loop, and it is only returning the last row... Havent experienced that before, but here it is, looks fine to me? [CODE] <?php // NAVIGATION: $subjectset = mysqli_query($connection, "SELECT url, link FROM subjects ORDER BY id ASC"); while($subject = mysqli_fetch_array($subjectset)){ $url = $subject['url']; $link = $subject['link']; … | |
Hi All, I am using a loop to display professionals and their data on a webpage. I have a "Recommend" button that is included in this loop and when clicked, displays a jquery POPUP form that will email the chosen professionals data. My trouble is, when I click the "Recommend" … | |
| Hello, im having a problem with php's file_exists and is_file, it seems to be passing if a file was not specified, i looked into the official php documentation to find file_exist and is_file can also check i directory exists but i dont want this i just want to check if … |
Hi all, i need some help with my php code. I want to create upload form with 4 fields : two dropdown buttons, 1 text field and the browse button. I have problem with validating my files ,because i want only to upload pptx, ppt and pdf files , to … | |
i m trying to fetch a image from mysql (blob) with header..here is my coding..."<?php include("db.php"); $query=mysql_query("select * from table where id='3' "); $row=mysql_fetch_array($query); $r=$row['image']; header("content-type:image"); echo $r; ?>" i want to fetch another fields from the database....but when i try to echo another fields...the page shows error or it … | |
| I would be grateful if someone could suggest what I need to do to get this to work. I have copied two short scripts which should demo the use of $_session, but the read script does not work. I believe the save script is the culprit though. Here they are: … |
The End.