39,393 Topics

Member Avatar for
Member Avatar for Dartz654

So, I just installed XAMPP on my PC running Windows 7. Here's what my website looks like: [B]/Header.php[/B][CODE] <?php session_start(); include("http://localhost/Functions.php"); connect(); ?> [/CODE] [B]/Functions.php[/B][CODE] <?php function connect(){ $username = "dartz654"; $password = "letmein"; $hostname = "localhost"; $con = mysql_connect($hostname,$username,$password) or die ("Unable to connect"); mysql_select_db(database, $con); } ?> [/CODE] …

Member Avatar for Asromi rOmi
0
930
Member Avatar for ooshaonline

a white blank space comes up when i try to access my site, and when i checked the error log on the server, i saw this: "PHP Warning: PHP Startup: Unable to load dynamic library '/usr/php/54/usr/lib64/php/modules/http.so' - /usr/php/54/usr/lib64/php/modules/http.so: undefined symbol: zend_new_interned_string in Unknown on line 0"

Member Avatar for hericles
0
40
Member Avatar for Richtofen345

Hi, I am trying to connect to mysql from php Below is the sample code i used. [COLOR="Green"]<?php <?php $username = "root"; $password = "pwd"; $hostname = "localhost"; $dbh = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); print "Connected to MySQL<br>"; mysql_close($dbh); ?>[/COLOR] The problem here is I …

Member Avatar for Deepika_6
0
2K
Member Avatar for kasr12

I have a query by different attributes. When one query is started and we are for example on page 7, and a new attribute is chosen, the query still shows the 7 page of new results. And it should show page 1 as the new attribute is chosen. Could you …

Member Avatar for cereal
0
195
Member Avatar for subramaniyam.k

Error: Apache shutdown unexpectedly. improper privileges, a crash, or a shutdown by another method. Press the Logs button to view error logs and check the Windows Event Viewer for more clues If you need more help, copy and post this entire log window on the forums

Member Avatar for cereal
0
37
Member Avatar for minitauros

So I've given RequireJS a try this weekend, and although it appears to work pretty smooth, I can't figure out one thing: How do I combine PHP and Javascript while using RequireJS? See, RequireJS can only work with .js files, meaning that it cannot "require" .php files. In many files, …

Member Avatar for minitauros
0
727
Member Avatar for Chem_1

Web address of some web sites end with ".aspx", ".php", ".jsp", etc.How web developers can hide the extensions from visibility.

Member Avatar for diafol
0
216
Member Avatar for razar63

I now have a simple "shopping cart" script that I have converted to an "add to shortlist" script to better suit my website. Everything wokrs great however after you click the add to shortlist link it goes to the shortlist page. Here is the code for "add to shortlist" <a …

Member Avatar for razar63
0
4K
Member Avatar for razar63

Im trying to bebug some javascript in firefox and I keep getting this error. SyntaxError: syntax error data: {action: addtocart, id: <br /> the javascript is this: <script type="text/javascript"> jQuery(document).ready(function($){ $('#button').on('click', function(e){ $.ajax({ url: 'shopping2/includes/functions.php', type: 'POST', data: {action: addtocart, id: <?php echo $pid; ?> }, cache: false, success: function(data){ …

Member Avatar for hericles
0
290
Member Avatar for RodneyzPc

Hi..I sure hope you can help me ! 2 years ago you helped with a Update Form and I've been trying to adapt the form to my mySQL Database.As I'm just learning and trying to figure some of this out I've seemed to have hit a road block. . . …

Member Avatar for RodneyzPc
0
443
Member Avatar for bro_1

how to remove php extension in .htaccess example media.php?page=test

Member Avatar for Isaac_4
0
224
Member Avatar for thilipdilip

Hi: I'm creating one classified site, in that we need to write SEO friendly urls for google page ranking and optimisation. How to do that any one pls help me.

Member Avatar for matrixdevuk
0
529
Member Avatar for rjusman90

want to minus the quantity when click delete if cart qty is more then 1 //remove item from shopping cart if(isset($_GET["removep"]) && isset($_GET["return_url"]) && isset($_SESSION["products"])){ $product_code = $_GET["removep"]; //get the product code to remove $product_s = $_GET["removes"]; //get the product size to remove $return_url = base64_decode($_GET["return_url"]); //get return url foreach …

Member Avatar for minitauros
0
176
Member Avatar for numus175

hello im newbie i have a string example " i want to buy a new car " and i want to show only 3 words("i want to") from string can you help me please ? Does an example project exist for something like this? thank you

Member Avatar for diafol
0
714
Member Avatar for HuePig

Hi, im trying to transform a string to make it a date $date1 = '$month/$day/$year'; //in jS value form type="number" $date2 = strtotime($date1); $date3 = date('Y-m-d',$date2); The problem is that when I SET date = $date3 the database saves 0000-00-00. what am I doing wrong??

Member Avatar for diafol
0
271
Member Avatar for Isaac_4

Here is a simple way to insert into a database that isn't much harder than using string concatenation - which we all know is very dangerous due to SQL injection attacks. Put the code snippet into `database.php`. Now, in a script handling a form post, such as `post_reply.php`: <?php require_once("database.php"); …

Member Avatar for diafol
4
505
Member Avatar for missy_mi

I am trying to make a registration form and when submit it will save in my phpmyadmin database. this is for my register.html : <!doctype html> <html> <head> <meta charset="utf-8"> <title>Register</title> </head> <body> <form name="register" action="register_p.php" method="post"> <center><table width="900" border="0" cellspacing="0" cellpadding="0"> <center></br></br> <tr><td width="61%"><p>Full Name: <input name="Fullname" type="text" id="Fullname" …

Member Avatar for missy_mi
0
319
Member Avatar for patk570

Hello, I am looking for a script to add items to a database that can be found in the my account section, The table in the database is structured: id | user_id | slug I want to use the ajax to update and remove it later on down the road …

Member Avatar for matrixdevuk
0
3K
Member Avatar for coolseancool

<?php require_once'start.php'; require_once'twitteroauth.php'; function cs( $string ) { if ( function_exists( "get_magic_quotes_gpc" ) && get_magic_quotes_gpc( ) ) { $string = stripslashes( $string ); } else if ( !get_magic_quotes_gpc( ) ) { $string = addslashes( $string ); } $string = @mysql_real_escape_string( @$string ); return $string; } if (!empty($_GET['get']) && $_GET['get'] == …

Member Avatar for matrixdevuk
0
314
Member Avatar for razar63

Here is the code <?php session_start(); ?> <!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 name="description" content="PHP Shopping Cart Using Sessions" /> <meta name="keywords" content="shopping cart tutorial, shopping cart, php, sessions" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" media="all" href="/style/style.css" type="text/css" /> <title>Cart</title> <?php include("header_1.php"); …

Member Avatar for matrixdevuk
0
396
Member Avatar for shayan_doust

Hello everyone. I have just bought a new computer and I am currently working on creating an online cloud storage service. Every thing is going fine until I am struck with a problem. At first, registering a new user works and the data is inserted into database but after testing …

Member Avatar for matrixdevuk
0
2K
Member Avatar for come_again

Hello, So i am trying to get a log in page to work but have run into this error: Warning: Cannot modify header information - headers already sent by (output started at .../views/header.php:15) in .../classes/login.php on line 77 I searched online and found others had this problem although I can't …

Member Avatar for come_again
0
144
Member Avatar for terryds

First, i'd like to show you my directories --themes -- images -img1.jpg -index.php -index.php My index.php (root) : <?php require_once '/themes/index.php'; ?> And, the index.php in the template : <!DOCTYPE html> <html> <head> <title>Test</title> </head> <body> <img src="images/img1.jpg"> </body> </html> I think it will load themes>>images>>img1.jpg But, it loads images>>img1.jpg …

Member Avatar for gabrielcastillo
0
215
Member Avatar for Murphyv10

Hey there Im tring to insert to a database from a form , however I cant get it to insrt with the dropdwon list, any help would be loved <h1>Insert Data Into Database Using CodeIgniter</h1> <?php echo form_label('lecturer_id:'); ?> <?php echo form_error('dname'); ?> <?php echo form_input(array('id' => 'dname', 'name' => …

Member Avatar for Murphyv10
0
176
Member Avatar for come_again

hello everyone, I am having some difficulty setting up a connection to my database. I created one on godaddy but am unable to get past this one hump: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)' in /home/badinvestor/public_html/config/connection.php:9 Stack trace: #0 …

Member Avatar for come_again
0
666
Member Avatar for awahqn

hi everyone, in my server, i am running a script thats uses curl heavily and it usually takes about 5 minutes to finish running. It used to wokr in my previous server, however, once i moved into my new server, it runs only for 30 seconds. In my php.ini, the …

Member Avatar for gabrielcastillo
0
4K
Member Avatar for fheppell

I have some code that takes a URL and downloads it using CURL. Here's the code: $url= $row['loc']; $path = 'tmp/'; $path .= rand(100,999); $path .= $row['name']; $fp = fopen($path, 'w'); $ch = curl_init($url); curl_setopt($ch, CURLOPT_FILE, $fp); $data = curl_exec($ch); curl_close($ch); fclose($fp); $downloadarray[] = array($path, $row['name']); However the file is …

Member Avatar for Isaac_4
0
290
Member Avatar for sammry

This is a SMS DLR application from http://www.smsgatewaycenter.com which is sent by them to my client's url and I need to configure for my client the same from my client's url to his reseller's url. This script uses every 1 hour to post data to my client's reseller/customer. So, it …

Member Avatar for Isaac_4
0
2K
Member Avatar for berserk

I was using this code before and it worked but then i updated my code base to php 5.3 and now it doesnt work anymore. I have looked over the logic time and time again and it should work fine, what am i doing wrong, or am i using deprecated …

Member Avatar for berserk
0
348
Member Avatar for grakovski

Link for API: [Click Here](http://api.uptimerobot.com/getMonitors?apiKey=u118216-ae6b502f1b3f6d272d0f9437&logs=1&alertContacts=1&responseTimes=1&responseTimesAverage=180&format=json) I want to get datetime and type parameters i try to but i get: Notice: Trying to get property of non-object Here is my try t $api_key = "apikey here"; $server = "http://api.uptimerobot.com/getMonitors?apiKey=$api_key&logs=1&alertContacts=1&responseTimes=1&responseTimesAverage=180&format=json"; $server2 = file_get_contents($server); $obj = @json_decode($server2); $cc = $alert->datetime; echo $cc; its …

Member Avatar for Isaac_4
0
387

The End.