39,326 Topics

Member Avatar for
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
725
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
289
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
223
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
528
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
174
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
702
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
270
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
501
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
317
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
313
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
394
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
175
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
665
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
386
Member Avatar for Ingska

Hi all! I am trying to post from a form to an URL, using cURL. I have managed to do the posting bit, and my data is coming thew to the URL just like I wanted. Here is my code: <?php //create array of data to be posted $post_data['Application.Ssn'] = …

Member Avatar for broj1
0
577
Member Avatar for bro_1

how to make like the picture below with jquery and php ![8f44abc169cde7f28b0640f162a17cee](/attachments/large/4/8f44abc169cde7f28b0640f162a17cee.png "8f44abc169cde7f28b0640f162a17cee")

Member Avatar for bro_1
0
133
Member Avatar for nadiam

Hi. so i have this div like so: ![d69e97a4413c033f6390ecaea54c6c8d](/attachments/large/4/d69e97a4413c033f6390ecaea54c6c8d.jpg "d69e97a4413c033f6390ecaea54c6c8d") see the "Add Spouse" link, when clicked will display another div: ![99b4077223bdea75c7de5b15af9b634b](/attachments/large/4/99b4077223bdea75c7de5b15af9b634b.jpg "99b4077223bdea75c7de5b15af9b634b") the edit spouse works by submitting the data wihtout refresh using `$.post`: $(document).ready(function(){ $("#submitSp").live("click", function() { var id = $("#contactid").val(); var ssalut = $("#spouse-salute").val(); var sfname = …

Member Avatar for gabrielcastillo
0
1K
Member Avatar for spiderling

I am trying to find out if it is possible to [B]edit/add to[/B] an existing PDF file with PHP. I have a PDF agreement document that needs to have the client's name inserted on the blank field. The document will then be printed for their signature. I've created PDF's with …

Member Avatar for Isaac_4
0
7K
Member Avatar for Beggersewen

A client of mine wants his site done using php-nuke, I was wondering if this is a good idea as it seems like there's not much using it and the support community is almost non-existent. Anybody here is using or have used it?

Member Avatar for veedeoo
0
562

The End.