516 Posted Topics

Member Avatar for lswan662

Sounds like you need to put single quotes around the x: [code=php] $x = escapeshellarg( $_GET['x'] ); [/code]

Member Avatar for lswan662
0
96
Member Avatar for anchal

Your probably not previewing the file via through the server. What testing server are you using? Make sure your url is something like with [url]http://localhost/filename.php[/url]. Where filename.php is your file. Also make sure the file is saved in your htdocs folder.

Member Avatar for Yayo_SK
0
178
Member Avatar for ruchi18
Member Avatar for SharePoint

This is a common problem, as text is so small. There is very little area to define where the mousover stops and the mouseout starts. So the display constantly toggles as the mouse wont sit perfectly still. In Flash, this is often cured by creating an invisible box to place …

Member Avatar for buddylee17
0
86
Member Avatar for khr2003

Well are you trying to compare the value of $lengths[2] to 25 or set $lengths[2] equal to 25? [code=php] if ($lengths[2] = 25) { [/code] This code is resetting the value of $lengths[2] to 25 and will result in the if statement being true every time. If you want to …

Member Avatar for khr2003
0
69
Member Avatar for emhmk1
Member Avatar for veledrom
Member Avatar for buddylee17
0
40
Member Avatar for mksakeesh

You could include it as a client or server side include. Are you wanting to call it before, during, or after the page is loaded?

Member Avatar for buddylee17
0
87
Member Avatar for arvindikchari

PayPal provides Instant Payment Notification (IPN). [url]https://www.paypal.com/cgi-bin/webscr?cmd=p/xcl/rec/ipn-intro-outside&[/url] They have a demo on the site to show how it works. Once PayPal sends the server a verified status, you can enable the button.

Member Avatar for buddylee17
0
102
Member Avatar for emiola

PHP variables are case sensitive. [icode]$Othernames[/icode] is not the same as [icode]$OtherNames[/icode] and [icode]$dateofbirth[/icode] is not the same as [icode]$Dateofbirth[/icode]. There are also some syntax issues. So [code=php]if mail'('$Surname, $Othernames, $dateofbirth, $age, $sex')' [/code] should be [code=php]if(mail($Surname, $OtherNames, $Dateofbirth, $age, $sex)) [/code] Also, please surround your code with [noparse][code=php]php code …

Member Avatar for mschroeder
0
138
Member Avatar for mmx68

You need to integrate a server side language such as php/asp/jsp/coldfusion to automatically update the database. You shouldn't be creating a new page for each user. You should have one template filled with variables that are populated by the database.

Member Avatar for mmx68
0
77
Member Avatar for qwertyas

I believe you'll need to use the complete host information:[code=php] $fp = fsockopen("alertbox.in", 80); [/code] should be [code=php] $fp = fsockopen($host, 80); [/code]

Member Avatar for buddylee17
0
78
Member Avatar for Designer_101

If you want to lower the file size, make it web accessible, and add a preloader, convert the ppt to flash. If your not familiar with Flash, just Google [URL="http://www.google.com/search?q=powerpoint+to+flash"]powerpoint to flash[/URL].

Member Avatar for almostbob
0
353
Member Avatar for wickedsunny

Try: [code=php] <?php $file=".htaccess"; $fp=fopen($file, "a"); $text ="\r\nRewriteEngine on \r\nRewriteRule ^page/([^/\.]+)/?$ index.php?page=$1 [L]"; fwrite($fp, $text); fclose($fp); ?> [/code]

Member Avatar for wickedsunny
0
377
Member Avatar for marcmm

You could use str_replace function to replace "//" with "/". [code=php] $uploadsDirectory = $_SERVER['DOCUMENT_ROOT'] . $directory_self . 'uploaded_files/'; $uploadsDirectory = str_replace("//","/",$uploadsDirectory); [/code] There are many other ways of fixing the problem. str_replace just seems the easiest to me.

Member Avatar for Yayo_SK
0
116
Member Avatar for mangel.murti

Look into using sessions for authentication. Basically the idea is: [code=php] <?php session_start(); if($_SESSION['loggedIn']==true){ echo "This content will only be viewable for users who are logged in"; } else{ echo "You are not logged in"; }?>[/code]

Member Avatar for buddylee17
0
105
Member Avatar for sacarias40
Member Avatar for millerandmiller

Your javascript is really overkill. You have 3 functions that could be condensed into one. Also, the 3 divs, Des_pic1-3, could be condensed since only one is displayed at a time. All of these things would also help condense the css.

Member Avatar for millerandmiller
0
128
Member Avatar for jzimmerman

You'll want to format the date back prior to doing the insert. So, in the script you use to process the form data, use strtotime to convert the string to a timestamp. Then insert the data.

Member Avatar for jzimmerman
0
154
Member Avatar for mirainc
Member Avatar for rajeesh_rsn
Member Avatar for rajeesh_rsn
0
101
Member Avatar for sacarias40

If the user_id data type is numeric, then it won't need single quotes in the sql. [code=php] $sql = mysql_query("INSERT INTO shoutbox (index, user_id, username, message) VALUES(' ', $user_id, '$username', '$message')"); [/code] This could also apply to the index, however since you are inserting an empty value, I would assume …

Member Avatar for sacarias40
0
95
Member Avatar for Borderline

You could start off with basic data validation. Pumping all of the fields into the db without checking even one of them? That's just asking for injection.

Member Avatar for Borderline
0
116
Member Avatar for sacarias40
Member Avatar for roryt
0
138
Member Avatar for shaneog

What about something like:[code=php]<?php function makeBold($var){ return (ereg_replace("[a|b]+[a-z]+[a-z]","<b>\\0</b>",$var)); } $row = "You are the best"; echo makeBold($row); ?> [/code] Outputs: You <b>are</b> the <b>best</b>

Member Avatar for digital-ether
0
2K
Member Avatar for Aamit

Post in the appropriate forum. This is not a php issue. If it were, the calendar wouldn't work on any browser.

Member Avatar for almostbob
0
174
Member Avatar for rajeesh_rsn

Also, if you have phpmyadmin, you can just upload the csv instead of writing a script.

Member Avatar for buddylee17
0
83
Member Avatar for ajhais

[icode]if($uid=$_GET['u'] && $pid=$_GET['p'] && $t=$_GET['ti'] && $type=$_GET['typ'])[/icode] You are setting values instead of comparing them. To compare, use [icode]if($uid==$_GET['u'] && $pid==$_GET['p'] && $t==$_GET['ti'] && $type==$_GET['typ'])[/icode]

Member Avatar for hielo
0
103
Member Avatar for onetwothree

Yeah, you don't want to prevent a page refresh. That takes quite a bit of JavaScript and quite frankly would annoy users. They don't want you to change their browsers behavior. Fix your code logic. Don't mess with browser hacks.

Member Avatar for buddylee17
0
166
Member Avatar for desiguru

[code=php] <?php $oldDate="2007-06-26"; $newDate=date("m-d-Y",strtotime($oldDate)); echo $newDate; ?> [/code] outputs: 06-26-2007 For more info, see the php date manual: [url]http://us3.php.net/date[/url]

Member Avatar for buddylee17
0
222
Member Avatar for wwwmadeasy

Set a field called verified in the database with a default value of 0 or False. Then after admin verifies, have him/her set the value to 1 or True.

Member Avatar for wwwmadeasy
0
166
Member Avatar for hhamdan
Member Avatar for buddylee17
0
106
Member Avatar for shrid

The border-radius attribute isn't yet supported by many browsers, like IE. I would recommend using FireWorks or Photoshop to make your buttons, since border-radius is only supported by Firefox, Safari, and a few others.

Member Avatar for roryt
0
82
Member Avatar for infotechland

Fireworks is for making vector graphics to be used in web pages. It has a lot of default styles to use for fast creation of custom dropdowns, buttons, and navigation bars. All of the neat little graphics found on DaniWeb can be created using FireWorks. If you use Firefox, right …

Member Avatar for roryt
0
128
Member Avatar for mattbaker

Set $theHash equal to empy before the for loop. Also, I think you'll want to poulate $theHash like this:[code=php] $theHash=""; for($i=0;$i<strlen($theMD5);$i++) { $tmp1 = ord($theMD5[$i]) / 16; $tmp2 = ord($theMD5[$i]) % 16; $theHash.= $hexArr[$tmp1] . $hexArr[$tmp2]; }[/code]

Member Avatar for buddylee17
0
47
Member Avatar for SuPrAiCeR69

Why do you need AJAX for this? [QUOTE]Once the next page has loaded, display that variable using GET[/QUOTE] AJAX is typically used to perform functions without a page load. If the page is going to load anyway, it would be much simpler just to use a server side script. [QUOTE]I'd …

Member Avatar for SuPrAiCeR69
0
95
Member Avatar for smarty9999

Please wrap your code in code tags: [noparse][code=html] Put code here[/code][/noparse]

Member Avatar for Jen0608
0
76
Member Avatar for navi17

For starters, <php is not a valid delimiter. Use <?php to start the code and ?> to end it. Is Apache and php configured correctly? Have you tried a simple [icode]<?php echo "It works.";?>[/icode] type script to test the server?

Member Avatar for navi17
0
85
Member Avatar for Sheridan

[url]http://www.atksolutions.com/articles/install_php_mysql_iis.html[/url]

Member Avatar for lightningrod66
0
112
Member Avatar for jhonnyboy

Looks like manish.s beat me too it. Just remember that your checkbox group is an array, and they have to be extracted with a loop. Also, a radio button may be better for the service if you only want one possible value.

Member Avatar for buddylee17
0
209
Member Avatar for squarkman

Have you tried using a header? [code=php]header('Location:index.php'); [/code] This will only work if nothing has been outputted to the client yet.

Member Avatar for buddylee17
0
197
Member Avatar for freshfitz

Do the customers know you are storing there credit card numbers? Do the credit card companies know about this? I think that both parties would have a problem with you storing this information without their knowing and without you having the proper security credentials.

Member Avatar for buddylee17
0
666
Member Avatar for theimben

[code=php]<?php $page = file_get_contents('http://www.google.com'); $num = md5(uniqid()); $filename = $num; $filename .=".html"; $handle=fopen($filename,"x+"); fwrite($handle,$page); ?>[/code]

Member Avatar for theimben
0
139
Member Avatar for lightningrod66

Yes the http.conf shouldn't have to be modified for simple read and write of text files. The http.conf is more used for things like enabling advanced functions like mod_rewrite that aren't normally enabled by default. Look into [URL="http://us.php.net/fopen"]fopen[/URL], [URL="http://us.php.net/manual/en/function.fwrite.php"]fwrite[/URL], and [URL="http://us.php.net/manual/en/function.fread.php"]fread[/URL]. Also if you run into trouble, DaniWeb has one …

Member Avatar for ingeva
0
2K
Member Avatar for nikesh.yadav

Apache is normally not configured to parse a .inc file so, if a user views the file, the source code will be revealed as plain text. However, if the users views the php file, the server will parse everything and the user will only see html.

Member Avatar for dasatti
0
1K
Member Avatar for desiguru

You could also cleanse the complete post array: [code=php] <?php @extract($_POST); foreach($_POST as $key => $value){ mysql_real_escape_string($value); } //now do specific cleansing and insert query [/code]

Member Avatar for buddylee17
0
91
Member Avatar for Brian R. Tolman

Yes, just open the db and save as .mdb. Then modify the DSN to reflect the changes.

Member Avatar for buddylee17
0
178
Member Avatar for veledrom

Here you go: [code=javascript] <script type="text/javascript"> function validator(){ var valid = true; if (document.form1.textMessage.value=='') { document.getElementById('tobeVisible').style.visibility='visible'; valid=false; } return valid; } </script> [/code]

Member Avatar for veledrom
0
133
Member Avatar for marcmm

Your code is a complete mess. You're trying to echo static html and it doesn't have any <?php delimiters. The delimiters tell the server which parts of the code to parse. Without them, all of your code gets delivered to the browser without being parsed in plain text. You are …

Member Avatar for manish.s
0
184
Member Avatar for ripper1510

Use php strtotime() function on the $fridate variable prior to the insert. [url]http://us3.php.net/strtotime[/url]

Member Avatar for ripper1510
0
125

The End.