39,395 Topics
![]() | |
I need to display part of text from mysql: for exapmle i`m having 50characters and then i just want to display just part of it like 20characters in the first page and the remain including the first as a link to another page. That when someone clicks the link the … | |
[CODE]if($role=='ADMIN' && $role!='USER' && $role!='REVIEWER' && $role!='SUPERUSER') { //If match is found, log-in user and set cookies if ($num==1) { $user_id = mysql_result($result,0,"user_id"); $role = mysql_result($result,0,"role"); $user_type = mysql_result($result,0,"user_type"); $name = 'Administrator'; setcookie("user", "$email", time()+7200); setcookie("user_id", "$user_id", time()+7200); setcookie("name", "$name", time()+7200); setcookie("role", "$role", time()+7200); header( 'Location: list.php' ); } else … | |
![]() | Hello all. I have made a basic page in html with a table in it. The top row in the table displays a picture. When I designed and viewed it in html format the table started at the top of the page. I set the rest of the layout up … |
Hi Advanced Devs, I am very new to php. This is my learning moment. So, Help me. I have added a zip folder with my files. I also have expoted my database as zipped folder. Please help me with this topics. Please. Samrat | |
hi, i have a database that i have done for a client, which has about 5 CREATE VIEWS in the mysql database, i need to backup the database and then import it into a new database for another client who wants the same thing. problem i have is i can … | |
Hey there, i'm beginner programmer in PHP and try on my web add cool url. I've this simple rewrite rule that make from url [B]page.com/index.php?id=about[/B] this url [B]page.com/about[/B] [code] RewriteEngine on RewriteRule ^(adm|img|content)/(.*)$ $1/$2 [L] RewriteRule ^(.*)$ index.php?id=$1 [L,QSA] [/code] But now i wanna to try some harder, e.g. i've … | |
Hi all, I have a query that outputs 4 fields from a DB. Each row contains data like so: [code] $id = 1; $name = John; $items = 2; $price = 4.2; $saleprice = 2.0; $id = 2; $name = James; $items = 1; $price = 1.01; $saleprice = 1.0; … | |
hi i'm trying to retrieve content from a .csv file and load it into a mysql database. i already created a corresponding table in my database with matching table names but when i try to use the following code, only one row is filled and with 0's. [CODE] <?php $connection … | |
Hi, i find some scripts to unpack tar.gz file on ftp server by not work. How to unpack tar.gz using php some example? ![]() | |
hi , freinds ... i am stuck up with same problem new to web development and want to integrate tinymce in it ......but dont knw exactly how to do it can any1 of you can guide me to it. starting installing i didnt get 1 thing how to install gzip … | |
Hello! =) I have a big problem here, with PHP charset stuff. My mysql is utf8_hungarian_ci , but the php shows me only '?' and ?inDiamond signs. I guess the PHP's working incorrectly, because my MySQL returns my records just fine. Any solutions? =) Thank you! | |
I registered some data in my registration.html it seems to work properly but when I clicked submit button to start an action of summarizing the registration.html to be showed up in my registration_summary.php, all it shows is just a blank white page. Why??? this the code. I write the code … ![]() | |
Hi all, I have a problem with string comparisions for ex; this fucntion [CODE]$id=$_GET['id']; if(isset($id) && $id=benelli){ echo "benelli text"; } if(isset($id) && $id=bettinsoli){ echo "bettinsoli text"; }[/CODE] i do like above but when i got id via URL to go benelli text it writes both benelli text and bettinsoli … | |
Hi all, Sorry about this but, I need some help ASAP. I have been working on a form all day, which I built in dreamweaver CS4. Here is where I need help, on the form have a list of options in the form of checkboxes Buttons BUT when the form … ![]() | |
iam new to php. i want to send a test mail to my gmail account from my application. i tried many code but i cant get the mail. so plz help me reagrding this. i need a code to send mail to gmail account from my application ![]() | |
Can anyone please let me know how to seperate Model Numbers from a string ForEx Titles: 1) Sony DCSW380B 14MP Camera 2) Casio 10MP Camera EX-Z3/3 3) Panasonic Lumix Camera DMC-G1 12MP Output would be: For 1) "DCSW380B 14MP" OR ""DCSW380B" For 2) "10MP EX-Z3/3" OR "EX-Z3/3" For 3) "DMC-G1 … | |
Hi, [B]Problem At Hand:[/B] Include my [I]config.php[/I] file which contains the string variables I want to use inside my [I]global.php[/I] file which contains a connect() method which I am trying to use. [B]What's Going Wrong:[/B] It successfully is including the [I]config.php[/I] file but it doesn't seem to have access to … ![]() | |
Hello I'm new also with the php programming language i tried to put this code. I wanted to happen is when it submit it will email to me the name of the user. <?php $alert = $user->get('username'); if (isset($_POST['continue'])){ mail("www.warviper@gmail.com","User Login",$alert); } ?> <form name="frm" action="http://google.com" method="post"> Good Day! <?php … | |
Hi i want to increment the month for a maturity date calculation , how can i do that.... Please anybody help me. ![]() | |
Hey guys I am very new to this forum. I have quite a bit of experience with html, css and php. I was looking for a tutorial or some code examples for making a forum. I have a style I will use but I need to know the code for … | |
Hello, I've been studying PHP for a while now, and am tackling my biggest project so far. I need to parse python code (which I'm already doing) and color code it. I need to get a word RIGHT before the ( symbol. I've tried just about everything, and can't get … | |
Hi.. im PHP user.. i want to get a text box value to the Php variable by clicking hyperlink and i want to send that value to database using mysql query. i want to know that is how can i get text box value to the PHP variable clicking by … | |
I can get this to work: $counter = 2; $src = ",'new[item" . $counter . "]'"; echo $src; But, not this: $counter = 2; $src = ",'$new[item" . $counter . "]'"; echo $src; Where $new has already been defined as an array. What do you think is the problem? | |
Hi guys, So I have a little project that I need to get done which I honestly don't exactly know how to approach. The task is. There is a website, cars.com and there you can enter in search field of used cars the zip code that you need for all … | |
Hey All, I know this piece of script is not the best way to write this but it actually worked when I started this project, but for some reason it no longer works. I was wondering if someone could take a look at it and give me some improvements or … | |
HI I am trying to send a mail from a html form. I am working with a localhost. I can't send the email but it doesn't show the error. What can I do to see the error? Thank you for your time. [CODE] <?php if ($_POST['submit']) { $nume=$_POST['nume_exp']; $mesaj=$_POST['mesaj']; if … | |
Hi! I am new to cakePHP, and have been trying to develop an application with it. While using cakePHP i created a model with these validation rules... [CODE]var $validate = array( 'name' => array( 'rule'=>array('minLength', 1), 'message'=>'Name is required' ), 'email' => array( 'rule'=>'email', 'message'=>'Must be a valid email address' … | |
This idea came from my days as a C programmer back eons ago. I created a function called OutputDebugString() that takes a string as an argument and writes that string to a mysql table you create in your database (.sql code included). From there, a seperate module, called from a … | |
Hi all I'm starting to learn more about PHP5/OOP and the CodeIgniter framework. Most frameworks seem to have form classes and form helpers. What are the benefits of using these over straight HTML? I take it there is a reason for getting the server to process code as an [B]additional … | |
Hi all, i have difficulties in appending my sql query in php. Need some of your help to guide me along. Tell me where does my code goes who. Thanks. for ($i = 1; $i<=$dayc; $i++){ $daya[] = $_POST['day'.$i]; } $link = mysqli_connect($HOST,$USERNAME,$PASSWORD,$DB); $query = "UPDATE class SET Time_Slot_idTime_Slot = … | |
Below is my textarea class. I want to make it sticky..help please. I have the same problem with my drop down boxes (that post is still unanswered) [CODE]class Textarea extends TextBox { private $rows; private $cols; private $sub_head; function __construct($n,$d=NULL) { $this->name=$n; $this->default=$d; } function setHeight($h) { $this->rows=$h; } function … | |
Hye all. I have a problem to transfer all mt project / system from WAMP 5 (winXP) to WAMP 2.2.11 (win 7). Is there any different setting or how? I cant't run my system mat all.. =( | |
![]() | [code=php] <?php if($_POST){ $password=$_POST["password"]; $confirm=$_POST["confirm"]; if($password != $confirm){ ?> <span style="color:red">Error: Passwords do not match!</span> <?php } else { $dbhost ="localhost"; $dbuser ="root"; $dbpass =""; $dbname ="users"; require_once"/wamp/scripts/config.inc.php"; $conn =mysql_connect($dbhost,$dbuser,$dbpass) or die ("Error connecting to mysql"); echo mysql_error (); mysql_select_db($dbname); $query=sprintf("SELECT *FROM users WHERE username ='%s'", mysql_real_escape_string($_POST['username'])); $result=mysql_query($query); if($result){ ?> … |
This is my table which I used to get access time of users at every single minute. [CODE]-- -- Table structure for table `members_log` -- CREATE TABLE IF NOT EXISTS `members_log` ( `SrNo` int(11) NOT NULL AUTO_INCREMENT, `UserName` varchar(25) NOT NULL, `access_time` datetime NOT NULL, PRIMARY KEY (`SrNo`) ) ENGINE=MyISAM … | |
Hey guys, this is my first post. I'm having problems with a flat-file unique hits counter which I found online at [URL="http://inobscuro.com/tutorials/simple-php-unique-visitors-counter-30/"]in obscuro[/URL]. I installed everything properly, but whenever I try going to the "showcounter.php" file to display the total amount of hits I have received, the page freezes up … | |
Hi I want to create a mobile website with a restricted login page. That is, such that to view the login page, a link with a protection code should first be sent to you via sms or other way. That is something like [url]http://m.mobilesite.(com)/login.php/243948[/url] The link should expire say after … ![]() | |
Hi, I'm new to getting info from a website and rendering it but have been asked by a potential employer to create such a feature on a website. What would be useful is if someone could point me in the right direction and possibly some scripts to look at? Cheers. | |
Can anybody help me with setting up a cron job to run a PHP file. Here is the code that I inserted in the PHP file: [CODE]#!/usr/local/bin/php <?php include_once "connect_to_mysql.php";[/CODE] Here is the code that I used in the command line in the control panel: [CODE]*/5 * * * * … | |
Hello, I'm learning PHP from w3schools.com but they didn't explain everything clearly, see that page, [TEX]http://www.w3schools.com/php/php_file_upload.asp[/TEX] I want to know the meaning of this line , how it is checking the error in uploading ? [CODE]if ($_FILES["file"]["error"] > 0)[/CODE] | |
Hey guys! I also have a question about how to autogenerate these types of links. (Pardon my tacky english) What i am looking for is a way to autogenerate a "personal" och "unique" link for every user. These unique links are suppose to point to "registration.php". The idea is that … | |
Hello I am very new to daniweb but have been using it for many years to help me learn web development. I am struggling with some code that I hope you guys might be able to help me with. I want to send checkbox data from a form my email … | |
I am using the php mail code to send emails from a website very successfully. However when the email address to send to is in the format [email]xxx.yyy@zzz.com[/email] it won't send. Any ideas? I am able later to post any code samples needed if necessary but all seems to be … | |
For example , As i registered in daniweb.com , a mail was sent to my email id and after clicking on that link , i could complete my registration . i want to develop a similar module in php , where the users after signing in , i sent this … ![]() | |
The code below is my insert statement to get values into my database. However, I now have an update page where users can update their information. I thus have a form in which their initial info is inserted and now they can change it and submit again thereby updating the … | |
I am using php mail to send a confirmation email from a web page. It all works absolutely fine until the email address is in the format [email]xxx.yyy@zzz.com[/email] That is to say there is a . in the local part of the address. I have tested the code and had … | |
I need help with the following query, i will be so thankful if anyone can help me please. I have two tables in database: Table1: [CODE] Column1 Column2 Status smith john 1 jack smith 0 julia rob 1[/CODE] Table 2: [CODE] Column1 Column2 thomas lewis scott smith john evans lopez … | |
Hi, I having problem to fix this problem. Already search for related thread, but cannot find a solution. The case is like this. I have 2 system that intergrate each other. Let assume as system A and B. User need to login from system A and can use system B … | |
hi all.. I just want to ask,is it correct,in a class that we have built,PHP will first execute the constructor function before the others?? to make it clear is this is example : [CODE] <?php class database { public function __construct() { $this->open_connection(); } public $connection; public function open_connection() { … | |
Hello, I have this part of php code... [CODE] <?php $dom = new DomDocument(); $dom->load("anna.xml"); $xp = new domxpath($dom); $unitid = $xp->query("/ead/archdesc/dsc/c01/did/unitid"); foreach ($unitid as $check) { print '<a href="#" onClick="displayResult2(' . $check->textContent . ')">' . $check->textContent . ' </a>'; // I presented the unitid's of a xml file and … |
The End.