39,320 Topics
| |
I have attached a require PHP to my html pages for my vertical navigation bar but now my problem is how do I do this and have the navigation menu side be side with my text? Here is one of the pages on my site, the home page works great … | |
1. <?php 2. $_page = null; 3. include(MODS_DIRECTORY."/client.php"); 4. $auth_url = "http://localhost/server.php"; 5. $data = file_get_contents(); 6. $result = json_decode($result); 7. if($result['valid'] != true){ 8. die("Invalid Key. Script Stopped!") 9. } 10. ?> I'm bit new to PHP. Could anyone please tell me what's wrong in the above code snippet? … | |
Hey guys, have a quick multiple database connection question I hope will be simple to answer. I've worked with this type of situation several times, but I must be missing something. I have a newspaper website that has 8 databases (news, obituaries, opinion, etc..) which can hold about 7 counties … | |
i have a excel file of hindi data. i want to convert in sql database what i do? please help me | |
Hello, I noticed some time ago a website that allows you to find ip of a site you want,, I searched a lot but I can'' not found code that allows you finding a ip just by typing the URL in the box. I really appreciate who can help's me. … | |
this works fine $view_query = mysql_query("SELECT ip_address FROM view"); but this query below give me a error $view_query = mysql_query("SELECT ip_address FROM view WHERE ip_address = $user_ip") or die(mysql_error()); error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the … | |
I have three arrays & i like to convert it in one multidimensional array. $array1=array('Kathy', 'Adam', 'Jenny'); $array2=array('student','teacher','driver'); $array3=array(2, 5, 8); $mix=array(); $mix['name']=array_values( $array1); $mix['profession']=array_values( $array2); $mix['SL']=array_values( $array3); OUTPUT: Array ( [name] => Array ( [0] => Kathy [1] => Adam [2] => Jenny ) [profession] => Array ( [0] … | |
Hi friends, I am having small doubt regarding redirection of my webpages. folder structure : **project/admin/** i want to redirect this to **project/admin/adminlogin.php** Please check the below .htaccess code and corect me plz. Below .htaccess file saved in **project/admin/** this path. Options +FollowSymLinks RewriteEngine On DirectoryIndex adminlogin.php | |
Hi, I have this website which I am developing, but it is having display problems. I have a directory called 'includes' which contains 'header.php', 'login.inc.php' and 'login_form.inc.php' 'header.php' - displays the normal doctype, meta tags, styles, etc. 'login.inc.php' - is the actual process of the login form once the form … | |
<?php $con = mysql_connect('localhost','root',''); <?php $con = mysql_connect('localhost','root',''); $db = mysql_select_db('myuploads',$con);$un = $_GET['usname']; $ps = $_GET['passwd']; $retr = mysql_query("SELECT uname,password FROM user WHERE uname = '$un' "); while($row = mysql_fetch_assoc($retr)) { if($row['uname'] == $un) { if($row['uname']== $un && $row['password'] == $ps) { echo "Welcome ".strtolower($un); } else echo "Password doesnt … | |
Hello buddies and merry christmas I have a string which is a file name with multi parts (my file.part001) I need to remove the (.part001) form the string so only the (my file) still. I've tried function removeFromEnd($string, $Remove) { $RemoveLen = strlen($Remove); $stringLen = strlen($string); $pos = $stringLen - … | |
I have links like, #**#/Home**, **#/About** how to remove **#/** using .htaccess I have other RewriteRules and they all work fine URL's are displayed like **localhost/site/#/Home** | |
so the page protection code I finally got to work is working properly in all the browsers however with safari after I log out i can click the back button and get into the protected pages and change things, however once the submit button is hit or the page is … | |
Hello Daniweb Univere, I am looking for a good program to use to store several dozen text documents, make them searchable, and ideally, allow me to link to specific lines of the document. I imagine there are programs like this, I have just been unable to find them. Any suggestions … | |
hi all.... i dont know how to indicate the gmail status of client is online or offline in a static html page... if client is online then it should be indicate the status in green else it should be red...... any help.... tnx in advnc.... | |
I need to allow my customer to upload a picture and then display the image source tag for the picture so they can copy it and paste it where they want to in the text area I am providing for them. i.e. how facebook notes works | |
Hello, I am new in PHP.Please tell me how to implement API in php. Thanks | |
Please help! i can't connect codeigniter to Oracle I am trying to connect Codeigniter to Oracle 11g, here are my settings Settings in database.php: $active_group = 'default'; $active_record = TRUE; $db['default']['hostname'] = "//localhost/"; $db['default']['username'] = 'xxxxxxx'; $db['default']['password'] = 'xxxxxxx'; $db['default']['database'] = 'orcl'; $db['default']['dbdriver'] = 'oci8'; $db['default']['dbprefix'] = ''; $db['default']['pconnect'] = … | |
hi all... pls help me... i have a problem with my code... if there is multiple product id in the table tbl_order_item for an order_id. then it should fetch those product id from that table tbl_order_item. here is my code... echo $s_country; $sql2="SELECT prod_id FROM tbl_order_item WHERE order_id='$order_id'"; $res=mysql_query($sql2) or … | |
**My function for retrieving data from database:** function db_retrieve($query) { // user password etc. require_once('db_info.php'); // Initialise function vars. $q_success = 0; // Query successful? $error_text = ""; // Error text (if any). $db_handle = mysqli_connect($db_host, $db_user, $db_pass, $db_name); $db_found = mysqli_select_db($db_handle, $db_name); // Database found if($db_found) { // Query … | |
Hello Community, I want to know if there is a way to use the same session throughout my whole website (eg. main domain and sub domain) using PHP? **NOTE:** I'm using a free hosting website so my website is a subdomain of the host website (eg. "http://mywebsite.hostwebsite.com" (I hope you … | |
Hello, I have a site about a game and i need if there is some code that helps me to anti-flood, please.thanks! if anyone can help me I would greatly appreciate This it's good? <?PHP IF (!ISSET($_SESSION)) { SESSION_START(); } // anti flood protection IF($_SESSION['last_session_request'] > TIME() - 2){ // … | |
when im test in my local machine i dont have any error but when im trying to test in web i have this error, the same DB, the same tables, the same data in both structures any idea???? Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in … | |
I've been looking into security for PHP and came across MySQLi prepared statements. After doing some research I'm confused about why you would use these instead of normal SQL query. A prepared statement looks something like this: $quer=$db->stmt_init(); if($quer->prepare("INSERT INTO `test` (`first`,`second`,`third`) VALUES (?,?,?)")) { $quer->bind_param('iss',$aa,$bb,$cc); $aa=1; $bb="something"; $cc="testdata"; $quer->execute(); … | |
hello guys how are you sorry i have another question i want to display images on left side and right side on my website for example in this code i have 9 images and i want to spread them 4 on the left side and 4 on the right side … | |
Hi, I am chaging from mysql_* to PDO and I found this tutorial in [Here](http://net.tutsplus.com/tutorials/php/php-database-access-are-you-doing-it-correctly/) And, so far let's say I chose this query to update a database. $id = 5; $name = "Joe the Plumber"; try { $pdo = new PDO('mysql:host=localhost;dbname=someDatabase', $username, $password); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $stmt = $pdo->prepare('UPDATE someTable … | |
Hello, I am using the tutorial from Oracle's site on how to connect to a database in PHP using code similar to the one shown below. <?php // Create connection to Oracle $conn = oci_connect("phphol", "welcome", "//localhost/orcl"); $query = 'select * from departments'; $stid = oci_parse($conn, $query); $r = oci_execute($stid); … | |
What is the Python (2.7) equivalent of the PHP $_POST, $_GET, $_SESSION and $_COOKIE, and how are they used ? After almost 2 years of trying I have finally gotten Python to work on my WAMP server - only to find that it is severely lacking in web page functionality. | |
Are the crawled URLs stored in the database then they are traversed in BFS/DFS manner .... or is it something else ? Please Help! | |
Hi everyone, im trying to print getAktiva() but it return an error: "Fatal error: Call to protected method indukPerusahaanABC::getAktiva() from context '' in C:\xampp\htdocs\sad.php on line 41" Thanks in advance <?php class indukPerusahaanABC{ protected $nama; protected $jenis; protected $alamat; private $aktivaLancar; private $aktivaTetap; public function __construct($nama, $jenis, $alamat){ $this->nama = … |
The End.