39,320 Topics
| |
hi all; can anyone tell me where can i find a good example for this; i have this whole code [CODE]<?php $name = $_POST['name']; $sender = $_POST['e_mail']; $phone = $_POST['phone']; $subject = $_POST['subject']; $message = $_POST['message']; $email = $_POST['email']; // Insert data into hotelinfo table $sql="INSERT INTO mailRecord(name, sender, phone, … | |
hi have the next code[CODE] <?php $search="ala salsa portocala nueve vacas"; $where="texto ala salsa nueve texto portocala verde nueve"; $search = explode(" ",$search); $old_kw = array($search['0'], $search['1'], $search['2'], $search['3']); $new_kw = array('<b>'.$search['0'].'</b>', '<b>'.$search['1'].'</b>', '<b>'.$search['2'].'</b>', '<b>'.$search['3'].'</b>'); $where = str_replace($old_kw, $new_kw, $where); echo $where; ?> [/CODE] because i just started to learn … | |
Hi all , I have collected php shell scripts on various sites on web. However the only script which works is this : $ php helloWorld.php [CODE] <?php $var = "honey"; print "hello $var"; echo "world"; ?> [/CODE] Any other script which has different commands doesn't work on the system … | |
Some simple php code; [code=php] $dir = '../images/'; $file = $_GET['name']; // Last, First M. "nickname" $f = $dir.$file; list($width, $height, $type, $attr) = getimagesize($f); echo $f."<br />"; echo "width ".$width."<br />"; echo "<img src='$f' $attr title='getimagesize example' />"; [/code] while the last echo line displays the image correctly (and … | |
Hi, Anyone please help out. By using select query i am getting this following output. [B] itemname idno name price A B01 sa1 10 B B01 sa1 40 C B01 sa1 50 D B01 sa1 100 [/B] But i don't want this(as above one) type of display in my browser. … | |
I want to create a dropdown menu in my main menu. It should look like this: [URL="http://www.freeimagehosting.net/uploads/73ebcb47c3.jpg"]LINK to the photo[/URL] But I don't know how to get it work, that it should count the links (categories) inside the menu. If its more than 6, than it should put the 7th, … | |
I am currently working on a site that requires periodic download of data from other sites. For this I have been trying to find some way to make the server automatically download the data every few hours. Any suggestions on how I might get started? Right now we have to … | |
Hi, I have a site with a login form for users and administrators to enter their details. Anyone can show me simple code how to separate between admin login and user login because i'm new in php.I uses PHP object oriented.Anyone can show me simple tutorial and easy to understand … | |
I am having a problem with the execution of this particular php page. I'm using a wamp 2 server on windows7. The output is always "Unable to Open Database", no matter what changes I make to the code. Please help! I am a newbie in php! The php code is … | |
I think I must be blind ;) [CODE]$Title = $_POST['title']; $Category = $_POST['category']; $Content = $_POST['article']; $Tags = $_POST['tags']; $Description = $_POST['description']; //error below... $Title = addslashes($Title); //error above... $Category = addslashes($Category); $Content = addslashes($Content); $Tags = addslashes($Tags); $Description = addslashes($Description);[/CODE] I declared title the first time... $Title = $_POST['title']; … | |
Hi, I am having a problem in building a query.I want to get first 10 users that has 1000 positive feedback my table structure is something like this id(primary key) userid(name of the user) raterid(name of the rater) rate_type(type of rating for example +ve,-ve or neutral).I have used many queries … | |
Hi,I have 6 checkboxes. name,father name,city,state,dob,education What i am trying 1)if user check name,father name its shows only checked item [B]name[/B] [B]father name[/B] Mr. a Mr.abs Mr. B Mr.bcd ([B]table structure like that[/B]) 2)if user check name,father name,city its shows only checked item [B]name[/B] [B]father name[/B] [B]city[/B] Mr. a Mr.abs … | |
friends i want to create a array which contain no of unique key , it also need store in mysql database , which i have done on my wamp server but when i m running this code on web server online i getting that my page will hangup .......so please … | |
here is my code for read message but error display in my page Notice: Undefined index: message in C:\wamp\www\.....m\Mailbox\read_message.php on line 6 anyone help me for this problem.how to solve it. [CODE] CREATE TABLE `messages` ( `message_id` int(11) NOT NULL auto_increment, `from_user` varchar(65) character set latin1 collate latin1_general_ci NOT NULL, … | |
I'm new to using dreamweaver, earlier used simple text editor.Can someone please help me as to from where should I learn dreamweaver?I'm well-versed with Php basics. REgards | |
I have a problem, submit button is not working on index.php and if I copied into another page it works fine.. here is the complete code.. [CODE] <?php session_start(); if (!isset($_SESSION['username'])) { header('Location: login.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> <script type="text/javascript"> function … | |
I wrote this code in php, it's purposes is to update the user record in mySQL database. There's already a script view.php which displays all records in the database, in the view file there's a edit link which sends the user id information to edit.php via get method. on the … | |
Hy , i`m new on the forum , so Hello to all , I want to make a "mini robot" that autocalls it self every night at 12 o`clock , and calls a php function that deletes some records form database on some criteria.My problem is not what the php … | |
Hi I get this fatal error when I am upgrading from php4 to php5: Fatal error: Function name must be a string in /home/test5/www/sok-om-billan.php on line 54 My code is (line 54) : [CODE] if(isset($_POST["submit"]) && $_POST("submit") == "Legg til medsøker"){ [/CODE] Do i have to define it as a … | |
The following id my php code [CODE]<html> <head> Checking ! </head> <body> <?php $errors_array=array(); if(isset($_REQUEST["welcome_already_seen"])){ check_data(); if(count($error_array)!=0){ show_error(); show_welcum(); } else{ handle(); } } else { show_welcum(); } function show_welcum(){ echo "<form method='post'>"; echo "What's your ice cream flavour?"; echo "<br>"; echo "<input name='flavor' type='text'>"; echo "<br>"; echo "<input type='submit' … | |
Hello ...I just was trying to output the file names of different folders in my PC using PHP code...But I found that it outputs actually more than visible files in that particular folder..So what did I mean by visible that when I count the number of files in my folder … | |
Hi everyone, Im relatively new to PHP. Im required to create a database to store all the courses taken by a student and his/her grades. i have created the database and able to store and display all the data stored in the database. I have a problem here: Im required … | |
hello, i have to find google co=ordinates from given address. so i am displaying google map in popup box but i don't know why google map not loading in popup. but it is working fine in new page.when i am trying to display in popup then only i am getting … | |
i'm trying to get a clean url for my about page. i want to change [url]http://www.example.com/about.php[/url] to [url]http://www.example.com/about[/url] i put my htaccess file as this [code]RewriteEngine On RewriteBase / RewriteRule ^(.+)/([0-9]+)/?$ about.php[/code] it's not working though, i get the 404 not found error. | |
I have a PHP shopping cart system and it's using MS SQL for the backend. Currently it's using the mssql driver. Now I want to move it to Windows Azure and I'm required to change the driver to sqlsrv 2 in order for it to work there. Can anybody tell … | |
Hello to everyone and wish for a Happy New Year. I have an html code from which I want to execute various php files (with various parameters). Say the html file is called htmlcode.html. Say one php file is called phpfile1.php and a second php file called phpfile2.php Everything works … | |
Hello everyone i'm getting the following error message. [COLOR="Red"]Fatal error: Call to a member function prepare() on a non-object in C:\xampplite\htdocs\Prepared_Statements.php on line 20[/COLOR] My code so far [B]connection.php[/B] [CODE]$db_server = "localhost"; $db_user = "root"; $db_password = ""; $db = "test"; $connection = mysql_connect($db_server,$db_user,$db_password,$db); if(!$connection){ die("Database Connection Failed".mysql_error()); } $select_database … | |
Hello I get this message : Notice: Undefined index: id in *****7index.php on line 26 when we go from php4 to php5. My code on line 25-35 is : [code] <?php if($_GET["id"] == "web"){ echo "<link rel='stylesheet' href='css/style.css' media='screen'/>"; echo "<link rel='stylesheet' href='css/style.css' media='handheld, only screen and (max-device-width:480px)' />"; echo … | |
please correct this problem [CODE] id -- int user_id -- int friend_id -- int [/CODE] [CODE] <? session_start(); //starts session mysql_connect("localhost", "root", ""); mysql_select_db("admin"); if ($user_id= $_SESSION['logged']){ //check if user is logged in if($_GET['user_id']){ //gets userid $friend_id=$_GET['user_id']; //friend $by = $user_id; //me $query = "INSERT INTO friend_req ( 'friend_id , … | |
Hey, I have some php code that I cant seem to get working... Here is the code... This is the javascript that changed the ?show in the url to what the user selects.. [CODE]<script type="text/javascript"> function show(){ var e = document.getElementById("select"); var strUser = e.options[e.selectedIndex].value; window.location = "?show="+strUser; } </script> … |
The End.