39,320 Topics
| |
Hello,Can anybody show the work flow (working) of MVC architecture with example??Provide me the code...if you can.. | |
I have this code. I put everything within <?php ?>. Because I thought that would help. I have the code commented for easier read. Can someone please show me where I went wrong, or what I forgot? [code] <?php ?> <html> <head> <style> body { background-color:#000000; color:#E27907; font-family:Verdana,Arial; font-size:10pt; letter-spacing:2; … | |
[CODE]<table width="100%" align="center" border="0" bgcolor="#FFFFFF"> <tr height="30px" style="color:#000000;" > <th>Unique ID</th> <th>Username</th> <th>Form Name</th> <th>Name</th> <th>Mobile</th> <th>DOB</th> <th> </th> </tr> <? /*$username="username"; $password="password"; $database="your_database";*/ mysql_connect('locahost', 'username', 'password') or die(mysql_error()); mysql_select_db('database') or die(mysql_error()); $query="SELECT * FROM table_name WHERE user_id='username'"; $result=mysql_query($query); $num=mysql_num_rows($result); mysql_close(); $i=0; while ($i < $num) { $form_id=mysql_result($result,$i,"form_id"); $form_name=mysql_result($result,$i,"form_name"); $username=mysql_result($result,$i,"user_id"); $first=mysql_result($result,$i,"first"); … | |
Hello, I'm new to php, I'm working on a website for employment. I want user to be able to pull data from mysql by using selection from drop down menu. I have a table call jobs, inside this table there are 5 columns: JobType, Place, Wage, Phone, Date. I created … | |
In a few URLs I have on my website, they feed a parameter into the URL that sometimes contains [] in it. I have a preg_replace fixing some links, but the [] breaks my current system. How can i make this work? (I need it in the second half, for … | |
Hi, I have a code here (in a model behavior). [CODE] function beforeFind(&$model, $queryData) { foreach($model->cryptedFields AS $key => $field) { if(strstr($queryData['fields'],$field)) { $queryData['fields'] = str_replace($field,DboSource::expression("AES_DECRYPT({$value}, '{$this->aesKey}')"),$queryData['fields']); } } return $queryData; } [/CODE] I want certain fields to be affected with AES_DECRYPT, however, it does not work. When i use … | |
Is there an easy way to post a form to the same page. I currently have an HTML (/javascript) page with a number of selection forms. I want to then display certin HTML below below based upon the users selection. Many Thanks, | |
Hi, I needs to create a PDF report for my project. Did PHPExcel suits for creating a PDF document. I needs a tutorial to create a PDF document. Please help me out. | |
the following code gives first date of week for the given date range. how to get week number from the date??? thanks. [CODE]<?php $start = $week = strtotime('2011-01-01'); $end = strtotime('2011-02-01'); while($week < $end) { echo date('Y-m-d',$week), PHP_EOL; //echo week num??? $week = strtotime("+1 week", $week); } ?>[/CODE] | |
i have written an application(login page) using codeigniter 2.02. when i try to load the page, it displays the following message: Fatal error: Class 'Controller' not found in /var/www/Files_Manager/application/controllers/login.php on line 2 this is the script: [CODE]<?php class Login extends Controller { //constructor function login() { parent::Controller(); $this->load->helper('url'); $this->load->helper('form'); $this->load->library('form_validation'); … | |
This is a very newbie post. I think I'm just missing something. Anyway. I'm trying to display the contents of one column's field (not column name) specified by the contents of another filed in the same row. Here I show you my table and what I need: [code] Enter password: … | |
| this is the code to email confirm. The user clicks on the link in the email, passing the code through url to this page. Then the data is transferred from a tmp table to main one. I have queried in phpmyadmin and it works fine. But when i actually use … |
Hi I have the error message in the line 61 : mail($mailto, $subject, $message, $header); I can't figure out what is wrong :( Can you advise ? thanks [CODE] <?php /* * v1.7 * * * */ $fromname = $_POST['fromname']; $mailfrom = $_POST['mailfrom']; $msg = filter_var($_POST['msg'], FILTER_SANITIZE_SPECIAL_CHARS); // filter from … | |
Hi i have 2 files one is Left.php which is is getting categories of product...code is [CODE] <?php require('Connection.php'); $query ="select distinct(P_Category) from tblProducts_info"; $result = mysql_query($query); if(!$result) { die('echo invalid query:,mysql_error()'); } else { if(mysql_num_rows($result)>0) { while($rows= mysql_fetch_array($result)) { $P_Category = $rows['P_Category']; $cat_List=""; $cat_List = "<li class=\"odd\"><a href=\"services.html\"?P_Category=$P_Category>$P_Category</a></li> "; … | |
I am looking at building a website that will allow people to sign up and post stats every week about others. For example, Joe has a show dog and likes to compete so Joe comes to to the site and posts. Dog Name: Breed: Weight: Skills: Week 1: Fastest lap … | |
I have the following code to bulk upload to several different tables [CODE]<?php /* Script to bulk import users into a Joomla installation (v 1.5). */ // Hande form upload if(isset($_POST['import'])) { $mysql_host = trim($_POST['mysql_host']); $mysql_user = trim($_POST['mysql_username']); $mysql_password = trim($_POST['mysql_password']); $mysql_schema = trim($_POST['mysql_schema']); $table_prefix = trim($_POST['table_prefix']); if(!mysql_connect($mysql_host, $mysql_user, $mysql_password) … | |
Hi, In my system,when i submit my form there is a message comes as "A new account number 1 is created successfully. Thereafter when i try to click on the "refresh" button another new account number is automatically created. Can anyone give some piece of code to avoid that problem? … | |
I am receiving the following error: Notice: Undefined offset: 1 in /home/content/53/7382753/html/Summer/wootsummer.php on line 68 Error, insert query failed on my code that is live at [url]http://obsidianpunch.com/Summer[/url] The offending line is [code]$topnow=$top[$countforme];[/code] however $top and $countforme are defined, so I am not sure why this is causing an error. Any … | |
I am playing a web-based game and i want to know if Php is capable of doing this problem this are the conditions: 1. there will be 3 text-areas a. the 1st will contain the guild's members b. the 2nd will contain the enemies c. the 3rd will contain the … | |
My professor gave us a sem-long project, before he introduce us php.. so here it goes create a dynamic website with the following situation 1. there will be an existing database, the database contains the following a. student name b. student id no. c. address d. other personal info 2. … | |
Hi Frendz, How to find the javascript is enabled in the browser or not? | |
Okay, here's the scenario. The same user accesses the same form a second time in order to place a new order. Both the new order and the old order are stored in a MYSQL table (called "orders"). My thought is that, when the new order is placed, I need to … | |
Hi, How to avoid the data insertion in mysql tables by refreshing the page using php. I am not redirecting my page. I am using $_SERVER['PHP_SELF'] in form action. Please help me out. its very urgent | |
Hi... I want to find out whether a file is existing or not The file is stored on another machine in the same network . I tried the following code.But always showing "The file is not existing". [CODE] <?php $filename = 'file://192.168.0.15/E:/PDF/p.pdf'; if (file_exists($filename)) { echo "The file $filename exists"; … | |
I have this bit which I have actually only tried in Google Chrome, but it works finte there: Im using ajax to get data from the Db, when popuating one select list based on whats selected from another: But in Internet Explorer 9, it doesnt work: [CODE] // JavaScript Document … | |
the code in php: name it as postback.php [CODE=PHP] <?php $q=$_GET['q']; $query_type=$_GET['query_type']; $words=explode(' ',$q); $con = mysql_connect('localhost', 'root', '')or die('Could not connect: ' . mysql_error()); mysql_select_db("clc_books", $con)or die('cannot connect'); $q = preg_replace('/\s\s+/', ' ', $q); // remove extra space echo "<table border='1'>"; echo" <tr> <th>book id</th> <th>book number</th> <th>book name</th> … | |
I am using Joomla with the Ambra Subscriptions module to accept payments. When a new customer signs up and makes a payment, their account is not being automatically activated. I find myself having to activate every account manually after a new customer complains that they can't log in. Under 'Site … | |
Hi, I want to make my website in two language. I need to make library for both of language. And I get template of those library with extension .mo. And those library are included in file .php. I want to make a new library but I can't open and create … | |
Hi There, I have an XML file and I list them by check boxes, categorized by their parent (branch). After selection of the check box, I take them and give the values `$branch`(only one at a time) and `$roles`(can be many eg. SBP|BNA) to web services. And run this web … | |
- I have the problem where my update is not not working.Anybody can help me... FORM <code> <?php session_start(); include ("../entity/login_class.php"); include ("../entity/admin_class.php"); include ("../entity/customer_class.php"); $Customers = new Customer(); $id = $Customers-> getCargoID(); $Customers ->getCargo($_GET['id']); $id = $Customers->getCargoID(); $cargoCode = $Customers->getCargoCode(); $cargoDesc = $Customers->getCargoDesc(); ?> <form method="post" name="updateCustomer" id="updateCustomer" action="../controller/customer_control.php" … |
The End.