PravinS
Members-
Posts
459 -
Joined
-
Last visited
-
Days Won
2
Everything posted by PravinS
-
sorry about that function showData() { $q = "select * from user where id=" . $this->userId; $r = $this->connectionString(); $result = $r->query($q); while ($row = $result->fetch_assoc()) { echo $row['name']; } } try replacing your showdata() function by above function
-
where have you defined fetch_assoc() function or is it mysql_fetch_assoc() function
-
you need to use $_GET as you are passing variable through query string add below code at the top in edit_form.php page $number = trim($_GET['number']);
-
<?php if (isset($_POST['btnsubmit'])) { $input = "website is ".trim($_POST['website']); //the above works fine but i want it empty so users can input their own hyperlinked urls $clickable = preg_replace('*(f|ht)tps?://[A-Za-z0-9\./?=\+&%]+*', '<a href="$0">$input</a>', $input); echo $clickable; } ?> <form action="" method="POST">Update your URL<br /> Email: <input type="text" value="php url" name="email"> Website: <input type="text" value="php url" name="website"> <input type="submit" value="submit" name="btnsubmit"> </form> use above code
-
use inheritance refer: http://php.net/manual/en/keyword.extends.php
-
try by defining $path variable as global in function() or try replacing this line of code $folders = array_filter(scandir($path), function($item) { global $path; return is_dir($path . $item); });
-
you can optimize your SQL queries by checking that how MySQL executes your queries and that can be done by using EXPLAIN statement refer: http://dev.mysql.com/doc/refman/5.0/en/using-explain.html so when you index your table use EXPLAIN statement to check its possible keys, rows and other details
-
session is displaying error after execution
PravinS replied to Pawan_Agarwal's topic in PHP Coding Help
write your session_start() function at top of your page, there should not be any single space, character etc.(basically any output) before session_start() function -
actually your query should work as it is, its strange that its not working, you can try assigning "CURRENT_TIMESTAMP" as default value for "lastdl" field and remove it from INSERT query so your query will be INSERT INTO weeklydownloads (app_id, week, weekdownloads) VALUES ('{$this->app_id}', '{$this->week}', 1) may this work for you
-
try changing its data type to timestamp
-
what is data type of field "lastdl"
-
Configuration to protect the PHP source code?
PravinS replied to ragax's topic in PHP Installation and Configuration
try ioncube http://www.ioncube.com/ -
finding and replacing keywords in large body's of text
PravinS replied to Carenburg's topic in PHP Coding Help
Use str_replace() function, you can also pass search and replace array http://php.net/manual/en/function.str-replace.php -
try replacing this line echo '<td><input type="hidden" name="id" value=' . $row["id"] . '> </td>'; with echo '<td><input type="hidden" name="id" value="'.$row["id"].'"></td>';
-
$date is variable and you are using is as object $date->format('d/m/Y'), so you are getting this error
-
you have passed invalid SQL query to mysqli_query() which return false to mysqli_fetch_array(), so you are getting this error. you cannot pass array in SQL query, you can convert array into comma(,) separated string and can use IN clause in SQL
-
you need web server (APACHE server) to execute PHP code, you can install WAMP or XAMPP on your local machine and can execute PHP script
-
PHP-SOAP Extension not loading
PravinS replied to AndyStorey's topic in PHP Installation and Configuration
try using NUSOAP - SOAP toolkit for php http://sourceforge.net/projects/nusoap/ -
How to fetch specific fields in database table in codeigniter
PravinS replied to charlesbritto's topic in Frameworks
refer: http://ellislab.com/codeigniter/user-guide/database/results.html -
import contacts from hotmail and yahoo using cakephp/php
PravinS replied to s4surbhi2218's topic in Third Party Scripts
try openiviter might this will help you http://bakery.cakephp.org/articles/Kainchi/2010/03/08/openinviter-for-cakephp-2- 1 reply
-
- import contacts
- hotmail
-
(and 1 more)
Tagged with:
-
yes it can be done, try this functions function loadsite(e) { if (!e) e = window.event; if (e.keyCode) { if (e.keyCode == "27") { setTimeout('openurl()',10000); } } } function openurl() { window.location.href = 'SITE_URL'; } first function is to check key code and if key is ESC key, then after some time interval(10000 = 10 seconds) it will call openurl() function, which is given next function now write below given code at the end of the page, it will check the key event and will call the loadsite() function document.onkeydown = loadsite; also you can check setTimout function reference here http://www.w3schools.com/jsref/met_win_settimeout.asp may this will help you