[CODE]Hi Friends, I have written a code with some example script for generating report in PDF with PHP and MYSQL. But i am unable to fetch the data from my table. So Please help me to solve this issue. Thanks <?php $today=date('Y-m-d'); $hostname = "localhost"; $database = "bdname"; $username = "root"; $password = ""; $conn = mysql_connect($hostname, $username, $password) or die(mysql_error()); mysql_select_db($database, $conn); date_default_timezone_set('UTC'); require('fpdf/fpdf.php'); class PDF_result extends FPDF { function __construct ($orientation = 'P', $unit = 'pt', $format = 'Letter', $margin = 40) { $this->FPDF($orientation, $unit, $format); $this->SetTopMargin($margin); $this->SetLeftMargin($margin); $this->SetRightMargin($margin); $this->SetAutoPageBreak(true, $margin); } function Header () { $this->Image('images/logo.png',100,15,200); // …

Member Avatar
Member Avatar
+0 forum 2

In a nutshell, my company is using several different programs that use a string of data regarding personal appearance information for different TV/movie character. This data need to be read in a very strict manner. (The following example is exactly how we need to input the information... including all brackets and greater/lessthan symbols. Example: [Performer=Character]<gender.age>.<ethnicity.skin.tone>.<height>.<bodyhair>.<haircolor.hairlength.hairtexture>.<eye.color> etc...etc...etc... [Sylvester.Stallone=Rocky.Balboa]<male.man.guy.middle.aged.adult>.<white.Caucasian.Italian.medium.mid.tone.toned.skin>.<average.height.stature>.<bare.smooth.hairless.chest>.<black.medium.mid.length.wavy.hair>.<brown.eyed.eyes> etc... Currently, my boss has half the company using shortcut keys to type all of this in manual. Absolutely ridiculous!!! So over the weekend I broke out my old HTLM/Javascript books and tried to make a simple webpage/form w/ multiple dropdowns or checkboxes …

Member Avatar
Member Avatar
+0 forum 5

function main() { if(window.XMLHttpRequest) { ab=new XMLHttpRequest; } else { ab=new ActiveXObject("Microsft.XMLHttp"); } ab.onreadystatechange=function(){ if(ab.readyState==4 && ab.status==200) { document.getElementById("progress").innerHTML=ab.responseText; } } ab.open("GET","querygoogle.php"); ab.send(); } function test(id) { if(window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest; } else { xmlhttp=new ActiveXObject("Microsft.XMLHttp"); } xmlhttp.onreadystatechange=function(){ if(xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("testdiv").innerHTML=xmlhttp.responseText; //alert(xmlhttp.responseText); } } xmlhttp.open("GET","test.php",0); xmlhttp.send(); } function interval() { main(); setInterval('test(<? echo $_SESSION['id'];?>)','5000'); //test(); } in the main() i am insertig data in a table and i am running this function synchronously 2 minutes and from test() i am getting the result, of on which insertion id this is processing every 5 second getting alert(id) but giving …

Member Avatar
+0 forum 0

hi, i want to make a functionality, in which a code will get sent to mobile number while registration, to complete the registration process. problem is, i don't know how to do it, please please, if anyone can help me, i would be a great help , thank you.

Member Avatar
Member Avatar
+0 forum 1

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\AppServ\www\eUTM\login\logincheck.php on line 13 here is the code: <?php //login check require_once("dbconn.php"); $con=connectdb(); $idpengguna=$_POST['idpengguna']; $katalaluan=$_POST['katalaluan']; //login PELAJAR from table pelajar $pekerja_query="SELECT * FROM pengguna where idpengguna = '$idpengguna' AND katalaluan = '$katalaluan'"; $pekerja_result=mysql_query($pekerja_query,$con); $pekerja_row=mysql_fetch_array($pekerja_result); if(!$nama_id && !$katalaluan) { $err=1; include("../index.php"); } elseif($nama_id == $pekerja_row["idpengguna"] && $katalaluan != $pekerja_row["katalaluan"]) { $err=2; include("../index.php"); } elseif($pekerja_row["idpengguna"] == $nama_id && $pekerja_row["katalaluan"] == $katalaluan) { session_start(); $_SESSION['pengguna_id'] = $pekerja_row["pengguna_no_id"]; header("Location: ../aduan.php?log=1"); } else { $err=3; include("../index.php"); } ?>

Member Avatar
Member Avatar
+0 forum 2

Find out more functions in php

Member Avatar
Member Avatar
+0 forum 1

function tempdbentry() { var regex=/^[0-9A-Za-z]+$/; //^[a-zA-z]+$/ var myname = document.ItemEntryForm.iname.value; var mycat = document.ItemEntryForm.selectcat.value; var mypic = document.ItemEntryForm.ipic.value; "<?php $phpmyname = '?><script language=javascript>document.write(myname);</script><?php'; $phpmyname = str_replace('?>', '', $phpmyname); ?>" "<?php $phpmycat = '?><script language=javascript>document.write(mycat);</script><?php'; $phpmycat = str_replace('?>', '', $phpmycat); ?>" "<?php $phpmypic = '?><script language=javascript>document.write(mypic);</script><?php'; $phpmypic = str_replace('?>', '', $phpmypic); ?>" if(regex.test(myname)) { "<?php $query1 = "SELECT * FROM temp_item_details WHERE titem_name = '$phpmyname'"; ?>" "<?php $result1 = mysql_query($query1); ?>" if ( "<?php mysql_num_rows($result1); ?>" == 0 ) { "<?php $query2 = "SELECT * FROM temp_item_details WHERE titem_image = '$phpmypic'"; ?>" "<?php $result2 = mysql_query($query2); ?>" if ( "<?php mysql_num_rows($result2); …

Member Avatar
Member Avatar
+0 forum 1

Hey, anybody know if there is a DLL available for Image Magick that I can put in the /ext directory and use Image Magick without having to install the Image Magick software? Thanks.

Member Avatar
Member Avatar
+0 forum 6

Whats wrong with how this is coded to were it is allowing anything to be inputted without recognizing errors? [CODE]$errors=0; $error="The following errors occured while processing your form input.<ul>"; pt_register('POST','ip'); pt_register('POST','date'); pt_register('POST','Text'); pt_register('POST','URL'); $healthy = array("$", "%", "!", "<", ">"); $yummy = array("", "", "", "", ""); $Text = str_replace($healthy, $yummy, $Text); $URL = str_replace($healthy, $yummy, $URL); if($URL=="http://www.") { die ("<center><br><br>Please enter a valid URL. Please go back and try again</center>"); } else { // yay } if($Text=="My awesome site!") { die ("<center><br><br>Please enter something besides 'My awesome site!' for your URL text. Go back and try again.</center>"); } else …

Member Avatar
Member Avatar
+0 forum 1

Hi Daniweb, I am confused, how to explode the numbers from database. Simply I can Explode, but after explode I have to relate the numbers to another table. If any one not clear abt my problem, pls reply Eg: 1, 2 Relate to Basket, football [CODE] $sql1=mysql_query("SELECT impid FROM customer where c_id=1") or die (mysql_error()); $result1 = mysql_fetch_array($sql1); echo $exp= $result1['impid']; // get 1, 2 from here echo $array=explode(",",$exp); // cannot get the output from explode function, How can I get the sports name from here. [/CODE]

Member Avatar
Member Avatar
-1 forum 2

how to make a php link which will open in new tab what should be the php code to open a link in new tab. how i can make a link in php which will open in new tab?

Member Avatar
Member Avatar
+0 forum 2

i am new in php so may be my problem could be so easy for u but i m not solve. anyone out there please help me. actually i am creating checkboxes inside the while loop with different id. and a user can check more than one checkbox and when click on the button the value of the checkbox should be shown in the div as the result. the code goes like this the code which create checkbox with different id is <?php $ret = mysql_query("SELECT * FROM workshopservicerate WHERE SID = '".$row['SID']."' order by SID DESC"); $cnt=1; while($row=mysql_fetch_array($ret)) { …

Member Avatar
Member Avatar
+0 forum 1

Howdy y'all, Got a question, why were here right, I have a page that is server side - no html included all php - I need to call/include a javascript function to handle a rather complex parsing routine but I am not sure how I go about calling the function inside this page...the information that I need to parse is being sent as a post from a form... As an example lets say that I have the following: [CODE] <?PHP //Remove dangerious and unwanted charectors from the form input function StripSpecChar($val) { return (preg_replace('/[^a-zA-Z0-9" "-.@\:\/_]/','', $val)); } //Convert POST data …

Member Avatar
Member Avatar
+0 forum 3

Hey y'all. I hope someone can shed some light on what I am needing to do. Just a little guidance should be good... What I have is an app where an employee slides their id badge and a form captures the long string of data from the magnetic strip on the back. I need to take the string that is read and convert it into two(2) separate variables. What I thought would be a simple task has got me beat.... Example of the full string: %B1500000000000015^EMPLOYEEID/SMITH John^031110100000019301000000877000000?;500000000000015=0305101193010877? First Variable from string: $StringVar1 = %B1500000000000015^EMPLOYEEID/SMITH John^031110100000019301000000877000000?; Second Variable from string: $StringVar2 …

Member Avatar
Member Avatar
+0 forum 5

Hey anyone, well I have creating an admin panel from which user can insert keywords as you type keywords in google.com. I hope you have understood, so how is it possible with php and in the same time they can insert new keywords like one u can see in this discussion forem for tags. If anyone with some ideas, plz do reply. Thanx in advance.

Member Avatar
Member Avatar
+0 forum 3

Hi there.... I was looking to add Jqzoom in a php page... there are different calls in the page and I got stucked with them..... Though I am a learner and want some one to help me with this..... My Page Shows this code [CODE]require('includes/application_top.php'); $navigation->remove_current_page(); $products_query = tep_db_query("select pd.products_name, p.products_image from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'"); $products = tep_db_fetch_array($products_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 …

Member Avatar
Member Avatar
+0 forum 5

Hello sweet members of this lovely forum, i must first thank you all for your efforts and assistance rendered to my request. Though i have barely stayed for two days now on this great forum but i have learnt something so far! so i say a big thanks to you all and the owners of this great forum Meanwhile, I have wanted to creat a blog to my site or a forum using dreamwaver 8, like have a site blog as starryconbnet.com/blog Php Or Html and i have been having it hard since then because i dont have Interakt, and …

Member Avatar
+0 forum 0

Please any one reply me................

Member Avatar
Member Avatar
+0 forum 2

Hello All, I'm trying to modify some code for an auction site but my lack of PHP knowledge is preventing me from doing so. I bought an "Essential Guide To CSS, AJAX,& PHP" book and have been doing the PHP exercises at the W3 site, but it seems that it'll be some time before I have a real grasp of what it is I'm trying to do. I'm hoping that one of you will be able to help me or steer me in the right direction. There are three pages that I need to help with - a php page, …

Member Avatar
Member Avatar
+0 forum 2

Hi all, this is my first post, so I would like to say hello to all members and will try to help when possible. What I am trying to do is to split a word document with N pages into N documents (one for each page) and give each of them a name given by the first word of each page. I have tried a few .doc split programs but couldn't get the name from the doc itself. I also have found some posts on php COM, explaining how to read a .doc, but couldn't get to split the .doc. …

Member Avatar
Member Avatar
+0 forum 1

Hello there I am a fairly new in MySQL/PHP/Javascript programming. I'm writing a web based gymnast profile management system for my final year project. Here's my problem. I have 5 MySQL InnoDB tables: [B]tests[/B], [B]testunits[/B], [B]points[/B], [B]testsgymnast[/B] and [B]gymnast[/B] I am able to retrieve a selected test which has particular units and each unit has a point associated with it using AJAX/PHP triple drop down list which is part of my Input Form called 'Create Gymnast Profile'. [B]My problem is that I don't know how to complete the creation of a gymnast profile by assigning multiple tests to a gymnast …

Member Avatar
Member Avatar
+0 forum 1

The End.