39,388 Topics
![]() | |
I have a singleton class that I am revamping and need a little help with. I want to use the following syntax for my queries without having to declare a global object. Below is my current code: /** * The db database object * * @access private * @var object … | |
I trried to add on line 48 on the asset library this paths but that didn't help me ` $asset_location = $base_url.‘system/assets' $asset_location = $base_url.‘system/application/assets/’;' I made a controller for my site and uploaded my library like this '$this->load->helper(asset);' In my view file I used css_asset('my.css'); The css is not … ![]() | |
Hi Guys Im kind of new to this and i hope you will be able to understand my question. I have a little dynamic news website. I have a form (called add_post.php)i use to insert my articles (blog_enrty). Unfortunately i get an error saying "you do not have permission to … | |
Hi, I am trying to integrate phpbbforum in my website. I have been successfull in adding the data of the user in the table of my website as well as my form user table.Now I am trying to make a single sign in for the user. It means that if … | |
Sooo ... I learned during my schema migration that our webpages use UTF-8 encoding but our MySQL database (all InnoDB tables) uses latin1. After finally running some utf8_decode() php magic, I was finally able to successfully get all posts to display correctly again. However, now that I realize there's an … | |
I have this code is about delete rows in table with confirm. everything is correct and work but in confirm when I click cancel not working it delete row I want to konw wate is the problem when clicking cancel here is my code <script type="text/javascript"> function show_confirm() { var … | |
I've considered myself somewhat of a procedural PHP expert, there is nothing I can't solve...Except this. You know when you try to declare a function that already exists and in the error you get a reference to where the function is located, the file and line number? Well, I am … | |
hello....anybody can help me? acctually,now i'm doing some php system... i create Sistem Kehadiran... but it can record one time only... can anybody help me? This is coding of my system... rekod2.php: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> … | |
I m having this problem while executing search > Notice: Undefined variable: i in D:\xampp\htdocs\search.php on line 23 > > Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in D:\xampp\htdocs\search.php on line 35 . here is my source code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html … | |
I can showing month and day in php, from this documentation http://php.net/manual/en/function.date.php for example Wednesday, 03 March 2012 i want to change it into my language Rabu, 03 Maret 2012 or it is best if can like this Rabu, 3 Maret 2012 i am using whm and cpanel, cant found … | |
hello i want display ( topic and author and date ) if user choose then click "save " how can do that ? this is my code: <?php $con=mysql_connect("localhost","root",""); if(!$con) { die('can not connect'.mysql_error()); } mysql_select_db("scms", $con ); $result = mysql_query("select * from others"); $num = mysql_num_rows($result); $row = mysql_fetch_array($result); … | |
Hi to all, I need to know how to use the cookie in php,my problem is that when i clicked the log-out.and then i will go to my browser and click the back button.it will go back to the user where it is still logging in.but what i want is … | |
Hi, I was wondering could anyone help me here. In my program, the user selects a document and fill's it out, submits it and receives an email with the information they filled out in. What I am trying to do now is that when the user selects document and submits … | |
i am unable to store data in database <?php include ("db_connect.php"); $res = mysql_query("SELECT * FROM posts"); while($data = mysql_fetch_array($res)) { $pid=$data['pid']; } echo $pid; $pid=$pid+1; //Get data in local variable $ptitle=$_POST['ptitle']; $uname=$_POST['uname']; $email=$_POST['email']; $pcont=$_POST['pcont']; if ($uname=="" or $ptitle=="" or $pcont=="" or $email=="") echo "All fields must be entered, hit … | |
Hello, all. Please advise how to use $_POST in cycle. I have the following code: 1. <?php 2. if (isset($_POST['id1'])) {$id1 = $_POST['id1']} 3. if (isset($_POST['id2'])) {$id2 = $_POST['id2']} 4. if (isset($_POST['id3'])) {$id3 = $_POST['id3']} 5. ?> I have tried: 1. <?php 2. for ($x=1, $x<=3, $x++) 3. { 4. … | |
hello! am trying to do a simple search engine, but whenever the user types a search term, the script returns the error: unidentified variable: name. name was the input name in the html code. ie (input name="name"). thanks. <?php $db = mysql_connect("localhost", "root", ""); mysql_select_db("room_p7", $db); $query = "select name, … | |
I am using firefox 9.0.1 under ubuntu 11.10. Suppose I am lying that I am using internet explorer 8 under windows vista. (by manipulating http request headers). Is there any way for the server to find this out? (at least the fact that I am using Ubuntu not Microsoft Windows) … | |
Hi, I am trying to creat a very simple session between 3 php pages as:index.php ,validate.php and target.php index.php <?php session_start(); $_SESSION['uid'] = 'test'; ?> <!DOCTYPE HTML> <html> <head> <title>Start A Session</title> </head> <body> <h1>Welcome to Heaven</h1> <form method="POST" action="validate.php"> Your Name: <input type="text" name="name" value="" /> <input type="submit" value="Submit" … | |
my script returns this error: Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\wamp\www\php_test\user_inter.php on line 17 <?php $db = mysql_connect("localhost"); mysql_select_db("room_p7", $db); $query = "select * from members"; $result = mysql_query($query); while($record=mysql_fetch_assoc($result)){ while(list($fieldname, $fieldvalue) = each($record)){ echo $fieldname.": <br>".$fieldvalue.":<br><br>"; } echo "<br><br>"; } ?> | |
hello :) please I need your help :( give me small example can do this: how can display information in page if selected ,,, look at this picture  | |
Hey guys, I have a script that will resize an image, .jpg, .png or .gif The .jpg works fine! But the .png doesnt work at all and I just cant get it to work... On from URL I get the following: ‰PNG IHDR,Éᘧ Why is this? I have a … | |
Hi guys... i got this code : $cat_arr=$_POST['cat']; $i = 0; / foreach ($cat_arr as $cat) { echo "\$cat_arr[$i] => $cat.\n"; $i++; And the result was '$cat_arr[0] => 2. $cat_arr[1] => 5.'. I would like to ask does this mean that is is equal to this: $cat_arr[0] =2; $cat_arr[1] =5; | |
# Heading Here # Please help me. When I get the value of price and stock whatever number value I input will turn into 0.00 while the stock turns empty.Btw I can get the other fields the code and the title values my only problem are the stock and pice. … | |
i make a website in php ,in whichi give topic on topic user give comment , problem is that when user give comment ,after giving comment when we refresh the page , the browser ask a question resend and cancel in dialogue box sir plz tell me how can i … | |
Hi I'm still retrospectively trying to edit all my interactions with the database to be in prepared statements. I'm having an issue with my registration form, with the passing of my $password and $activationKey. The code is: // $stmnt1 = $dbc->stmt_init(); $query = "INSERT INTO xxxxxxxxxxxxxxx VALUES (?,?,?,?,NOW(),?,?,?,?,?,?,?,?,?,?,?,?,?,?,'$activationKey')"; $stmnt = … | |
basically i am checking if i am in the same url as the page and i want to refresh the page only once,but whenever i try it keep refreshing infinitively place='/development/petersburg'; var pathname=window.location.pathname; if((pathname==place)){ window.location.reload();//reload the page } help!! how can i limit this page to refresh only once if … | |
Hello sir/mam `Inline Code Example Here` i am a student and working on php and javascript but i have a very little knowledge of javascript i am stcuk in my project i want to calculate total of two variables which are defined in two different javascript function here is my … | |
Hi, How can i create a link in my PHP code (index.php) that when a user click on that link it will: 1. call doSomething() function within index.php 2. then call Myhtml.html Thanks for your help | |
Hi I am a bit stuck on how to close a security issue. Basically if someone is looking at their profile and wants to edit it the URL will show the id of the user. Currently anyone can just change that number and have access to viewing and changing another … | |
REFERENCED WITH confic.php for connecting the database. $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); if(!$link) { die('Failed to connect to server: ' . mysql_error()); } //Select database $db = mysql_select_db(DB_DATABASE); if(!$db) { die("Unable to select database"); } //Function to sanitize values received from the form. Prevents SQL injection function clean($str) { $str … |
The End.