39,320 Topics
| |
I am writing some code that will have several functions. I need the functions to have my database connection, is there a way that I can include the connection variable in all functions? Thanks | |
Hello and thanks in advance for taking the time to look at this. I have an issue validating a Mailing Address form field. The problems is when users enter an address that has two sets of numerals. For instance; "12345 ABC Street Suite 200" will result in a validation error. … | |
I'm completely a newbie and I have this problem drilling into my head. Any fast help will be highly appriciated. I have a table "peoplebase" and there's a column "alias_switch". Now I want a script to act as a switch, if "alias_switch" is "1" then it should make it "2", … | |
hey all, Just a quick one (I hope). I've only ever really done this as a button from something simple like a drop down box. I have a table which is populated by a mysql db: echo "<table class=\"gridtable\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <th>Employer</th> <th>Vacancy</th> <th>Vacancy Type</th> <th>NoVacancies</th> <th>Learning Provider</th> <th>Contact … | |
I have this code in PHP: $sql = mysql_query("select * from peoplebase where FName like '%$fname%' AND MName like '%$mname%' AND LName like '%$lname%' AND street like '%$street%' AND city like '%$city%' AND state like '%$state%' and zip like '%$zip%' and ssn like '%$ssn%'"); while ($row = mysql_fetch_array($sql)){ echo "<div … | |
I am building a chat application based on websocket protocol.I am uploading this on an apache server and i am getting this error : "Warning: socket_bind() [function.socket-bind]: unable to bind address [98]: Address already in use" I am using port no. 12346. When i checked this port's status i got … | |
hi... i have this error in my code Fatal error: Call to undefined method myclass::addCat() in G:\AppServ\www\society\Admin\addCat.php on line 23 this is aclass function function addCat($t1) { mysql_query("insert into categories (Categoriesname)values ('$t1')") or die(mysql_error());} and this aline have a error if (isset($_POST['but1'])) { $t1=$_POST['txt1']; $m= new myclass(); $m->addCat($t1); } I … | |
I tried to run this code on xampp and also on codepad and it seems it is not compiling at all. <?php class MyName{ public $name="johnh"; public $lastname="doe"; public function setProperty($var_name,$var_lastname){ $this->name=$var_name; $this->lastname=$var_lastname; } public function getProperty(){ return $this->name. " ". $this->lastname; } } $obj=new MyName(); $obj->setProperty("jane","doe"); $obj->getProperty(); ?> Is … | |
i have the following code in my php script. it's for displaying a Crystal Report file. $cr = new COM( "crystalruntime.application" ); if ( $cr ) { $cr->OpenReport( "SelectExpert1.rpt", 1 ); } if i try to access the file with this code on my browser i get the following error. … | |
Is there a way to load CSS from the database, I am developing an Ecommerce website for UK in a system in which the user can discuss directly with the suppliers through the inbuilt chat. Please someone help me by showing the coding, Thanks. | |
Hi I have a 'categories' mysql table and a 'subcategories' table. I need to make a form so the site owner can remove subcategories as needed. I was think of having a form with 2 dropdowns on it, the first to choose the category, the second to choose the subcategory. … | |
<form action="process_registration.php" method="get" > <label for="lname">Login Name:</label> <input type="text" name="lname" id="lname" /> <label for="pswrd">Password:</label> <input type="password" name="pswrd" id="pswrd" /> <input type="submit" value="Submit" class="animated shake" /> <input type="reset" value="reset" class="animated shake" /> </form> and the php code is <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”> <head> … | |
while giving command zf create action login i get the error PHPUnit is required in order to generate controller test stubs. -------------any suggestions | |
I would really like for someone to take a little time and look over my code. I'm parsing some news content and I can insert the initial parse into my database which contains the news URL and the title. I'd like to expand it farther, to pass along each article … | |
Suppose I want to create an automated loan application system and I want to reduce the use of paper and man power. I want the system to let me know when a client pays back an instalment without the client having to submit the receipt from the bank since I … | |
Hi all, Having a small issue with some PHP i'm re-writing. I'm converting my old mysql to Mysqli for a new project. my database is called "jobboard" my table is called "details". The Idea is to have a drop down and then select the persons name (Which has the ID). … | |
` <script type="text/javascript"> function category(cid) { if(cid !="") { $('#process').show('slow'); $.post('<?php echo BASEDIR ?>/ajax.php',{action:'search_subcategory_by_category_for_advsearch','cid':cid}, function(data) { $('#process').hide('fast'); // $('#process'); $("#scid").html(data); } ); } } function subcategory(scid) { if(scid!='') { $('#process2').show('slow'); $.post('<?=BASEDIR?>/ajax.php',{action:'select_template_by_subcategory_for_refine','scid':scid},function (data) { $('#process2').hide('fast'); $("#specification").html(data); }); } } </script> <div class="lftpanel"> <div class="fl"><img src="<?=BASEDIR?>/images/browse_left.jpg" width="7" height="36" /></div> <div class="brow_bg">Refine Your … | |
Let's say you've got a form with check boxes like below: <form method="post" action="path to script"> <input type="textbox" id="text[]" value="" /> *** <input type="textbox" id="text[]" value="" /> *** <input type="textbox" id="text[]" value="" /> **** <input type="textbox" id="text[]" value="" /> **** </form> | |
Hi there, I am using the code below, which is bulked in with the "Keyring Social Importer" plugin for Wordpress, to import my Tweets on a regular basis as individual blog posts in my Wordpress blog. I would like to add a line of text within each created blog post, … | |
<html> <body> <form method="post" action=""> <input type="text" name="customername" required/> <input type="text" name="productname" required/> <input type="text" name="units" required/> <input type="text" name="price" required/> <input type="submit" value="submit"/> </form> <?php if($_POST) { $_SESSION['array']=array(); array_push($_SESSION['array'],($_POST)); print_r($_SESSION['array']); } ?> </body> </html> Here My Need Was i Want To Save the all data which was submitted by … | |
hie i have a php form which will require a user to enter an ID Number in this particular form e.g. 34 1297336 Z 42 how to i create an easy and neat validation for that field. thanks any help will be appreciated! | |
Hello Community, I was wondering if there is a way to make a page look like a subdirectory. This is what it would look like now http://example.com/page.php this is what i want it to look like http://example.com/sub/page.php But i don't want to put the page.php in a subdirectory i just … | |
This is the php code i have in my logout.php file: <?php session_start(); session_unset(); session_destroy(); header('Location: index.php'); exit(); ?> While starting the session, I set the variables username and password. My logout file isn't working properly. When i click logout, it leads me to my home page (index.php), but on … | |
i have a form which will display the details in a table,when edit button is clicked all the content in the table should come in a form(ie inside the textboxes)..so that the user can edit and save the content again in the database. [B][U]1st page[/U][/B] $link=mysql_connect($hostname, $username, $password); mysql_select_db($dbid) or … | |
We are using Joomla1.5.20 Joomla Multisite Verion 1.2.8 - Free Version Our URl Master Site URL is [url]http://usentrepreneurtoday.com/[/url] for which we have different slave sites like [url]http://newyork.usentrepreneurtoday.com/[/url] [url]http://pennsylvania.usentrepreneurtoday.com/[/url] We are facing a strange issue. The issue is that when we open our master site, the site is opening properly, but … | |
hey guys.. i'm working on e learning project.. i need to integrate Voice Chat in that.. so plz if anyone knows, plz help... Thanx in Advance... | |
i have two forms on 1 page. but the 2nd form keep going to 1st form action.. 2nd form suppose to go to approve.php..how do i solve this? when i click Approve it suppose to go to approve.php and execute the query there..but now when i click it give errors: … | |
Hi there, Following on from an earlier post, the below code is part of Keyring Social Importer, and it imports my Tweets from Twitter and posts them as individual blog posts on my Wordpress.org website. I was wondering, if any of you know php and Wordpress, how I could make … | |
Hello Community, I was just wondering why my password matching section ( } else if (!$password === $cPassword) { ) in the else if isn't working. Whats happening is it is saying the passwords do match but they don't. I have tried many ways to fix it there is one … | |
Hello I have databse in MySQL with 21 fields which are listed below Field Name Data Type NULL status text No roll_no text No branch_id int(5) No student_name text No father_name text No phone1 text No phone2 text No email text No dob date No city text No course_id varchar(5) … |
The End.