39,323 Topics
| |
Hi. I am using this command [CODE] include ($_SERVER['DOCUMENT_ROOT']."<path>"); [/CODE] to import a *.php file into another *.php file. However, i have noticed that in some cases it works, in some cases it does not. In another file I am using the same syntax to import a file which, is … | |
Could someone help me with this code? I need to compare the date completed(datecomp) to the date paid(datepaid) to establish the number of days difference(dayslate). Thanks in advance! [CODE]<?php $stat = mysql_connect("localhost","root",""); $stat = mysql_select_db("oodb"); $query = "SELECT name FROM oocust Where ordernum='$ordernum'"; $stat = @mysql_fetch_assoc(mysql_query($query)); echo $stat["name"]; $result= mysql_query("select … | |
how to apply multiple facility to one id.How i maintain this in database like insert,update........... | |
Hello: I'm having difficulty getting variables that are passed to another page in a url after migrating from an apache on window server to a apache on unix server. Here is the url: [code] <meta http-equiv="refresh" content="3;url=/i-cmsys/editableinvoice/index.php?edit_mileage=<?php echo $_POST['edit_currentmileage']; ?>&edit_servicearea=<?php echo $edit_servicearea_str; ?>&inputbox=<?php echo $_POST['inputbox']; ?>&edit_clientID=<?php echo $_POST['edit_clientID']; ?>&edit_firstname=<?php echo … | |
$pti="C:\Documents and Settings\Administrator\My Documents\My Pictures"; $ptt=$_SERVER['DOCUMENT_ROOT']."/greenmusic/thumbnails/thumbs"; $tw=100; $replacethumb=str_replace(" ","_",createThumbs($pti,$ptt,$tw)); Can any one help me. I'll be thankful to you. | |
I want to put this in a table so I can repeat this twice in two cell. [CODE] $intNumber = 1; $sql=correctanswer($_SESSION['username1'], $_SESSION['smodule']); echo "<strong>the ones are ticked is right answer </strong></td><br />\n"; while($info = mysql_fetch_array( $sql)) { echo " <strong>$intNumber, {$info['Que_Question']} </strong><br />\n"; for($i = 1; $i <= 4; … | |
Is it possible to have true global variables in PHP? The tests I have done so far seem to suggest that you can have a global variable that is global only to the php file that declares it and not to your whole website. Once you go to another php … | |
Hi Guys, Not sure if this is a php or sql problem but i keep getting the following error when trying to update a row using php and 'UPDATE': ERROR:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right … | |
i created a database (Questionnaires) i also create two tables (Questions and Answers) i successfully display the questions randomly but my problem is i cannot connect the answers according to its primary ID here is my code [CODE]mysql_select_db("questionaires", $con); $result = mysql_query("Select * from Answers where AnswerID = {$row['QuestionID']} order … | |
Hey Everyone! ( <-- First Post, Wow) Well i want use a URL variable like this... [PHP]www.site.co.uk/index.php?page="about"[/PHP] With me so far? Ok. Now when the user enters the index.php page, i want specific content loaded into a preset table, in the case above it would be the about page, but … | |
String concatenation is the string manipulation method when you join 2 or more strings together. In PHP it is a quite easy task. You can use the concatenation operator which is the ‘.’ (dot). You can join 2 or more strings into one as follows: $str1 = ‘This’; $str2 = … | |
hey guys I have a string containing email addresses like "ceo@facekut.com" <ceo@facekut.com>,"Rahul Mahajan" <creative.rahul007@gmail.com>......... Now is there a way in php to remove all the things between quotes "..." and make this look like below? <ceo@facekut.com>,<creative.rahul007@gmail.com>......... or [email]ceo@facekut.com[/email] ,creative.rahul007@gmail.com......... I would be very thankful if anyone has answer. Thanks | |
please clear the syntax error... [CODE] $locker_query ="update tbl_locker set locker_title='".$locker_title."',headline_text='".$locker_headline."',introductory_text='".$locker_intro_text."',popup_delay='". $locker_delay ."',repopup_frequency='".$locker_frequency."',forced_completion='".$locker_force_offer."',email_id='".$locker_email."',created_date=now(),guid='" . md5(time()). "' where locker_id='".20."'"; [/CODE] Thanks | |
Hi All, How do you use div class' in php such that you can attach html generated by php into that div class. Example <html> <head> </head> <body> <div class="border"> </div> <?php echo "This needs to go into the class border" ?> </body> </html> | |
[B]SOLVED ALREADY!!![/B] i'm getting the following error: UPDATE orders SET naamwijn = Josep Masasch Blanc de Blancs Brut Cava WHERE ordernr = 22 AND productnr = 16 LIMIT 1You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax … | |
I Downloaded Wamp server 2.0 for my php and mysql installation. When i click on the wamp server through start/programs/wampserver/startwampserver2.0 it just has an icon 'start wamp server 2.0',is it the right file i downloaded?isnt it supposed to contain other clickable icons like phpmyadmin,mysql,apache ?? Secondly,do i need to download … | |
Hi all I'm a newie to PHP. I have a html form which will passed 6 value to a php file and from a php file, I would like to write these value on to 2 rows in the excel. Therefore each person submit the form, it will write 6 … | |
Hi all - How can i echo back the value of of the following - If the form has other errors - ie. if a user has missed filling in a field - I can echo other fields if there are errors Im just having some difficulties in echo-ing out … | |
below is my code to use chekc boxes to update my status field to either a 1 or 2, but altohught it doesnt show any errors, it wont update HELP PLZ </style> </head> <body> <table width="744" height="536" border="1"> <tr> <td height="63" colspan="4" bgcolor="#8BCB6A"><p><img src="CO-OP title.gif" width="407" height="64" /> <?php $connection=mysql_connect('localhost','but09081489',''); … | |
I'm relatively new to all this so go slow. But what I'm trying to do is have a button where the user can click it and download a file from my site to their computer. I don't know if you need a script to do this or if their is … | |
Hello all, I am working on penny auction site,so i need count down timer script for getting current update such as remaining time current bidder, and current price of auction, I have already implement javascript and its calling php script for getting latest update. Also it is working but count … | |
[CODE]<?PHP // Original PHP code by Chirp Internet: [url]www.chirp.com.au[/url] // Please acknowledge use of this code by including this header. function getImages($dir) { global $imagetypes; // array to hold return value What does retval mean? $retval = array(); // add trailing slash if missing if(substr($dir, -1) != "/") $dir .= … | |
Hi I am using the following code to convert html to pdf. But the resulting pdf page shows blank. Please help me...its very urgent.. [CODE]require('pdf/html2fpdf.php'); $str =stripslashes('<div style="width:580px;" align="left">'.$pdfmessage."</div>"); $html=str_replace(" ","",$str); $pdf=new HTML2FPDF(); $pdf->AddPage(); $pdf->SetLeftMargin(25); $pdf->SetFontSize(12); $pdf->WriteHTML($html); $pdf->Output($invno.'.pdf','F');[/CODE] | |
I am doing an equation and the outcome is 45.454545454545454545. I would like to get rid of the 45454545 after the decimal point. and have 45% [CODE] $final=5/11*100; [/CODE] | |
hey ppl, you helped me out allot of times, so i come back to you once again, i just transfered my website from a local pc(for testing) to a webserver @ my hosting. now some parts arent working correctly. [B]some extra info about the page:[/B] What kind of web page … | |
I am able to upload a file and echo these. But now I would like to upload these to my database. How would I go onto doing this. I found something like this for C++. but not sure how to convert this to PHP. this is what I found [CODE] … | |
Good day: Need some assistance with an idea which seem to be complicated as I think of it and can't seem to figure out an appropriate implementation. I'm working on a hosted service app which requires a php logging system to identify the user and their respective account. On this … | |
Hi, query showing error [CODE] "SELECT * FROM admin INNER join category on category.cat_id=admin.cat_id where admin.company=".$_REQUEST['company'].""; [/CODE] thanks | |
HI i am try to delete multiple data by using check-box in php i tried but is don't works not getting the ids from the check-box.. my code is [CODE] <tbody> <?php while ($row = mysql_fetch_array($res)) { ?> <tr class=" <?php echo $class = ($class == 'even') ? 'odd' : … | |
I am a beginner to PHP, I have a table dyn_menu to store menu items in the database. The parent_id is the id of the parent menu item. I need to generate an array like, array[ -1 --3 -2 --4 ---6 -5 ] The table shown below.Please help me to … |
The End.