263 Posted Topics

Member Avatar for -==Zero==-

Try this [CODE] <?php $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name="test"; // Database name $tbl_name="members"; // Table name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); // username and password sent from form $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; // …

Member Avatar for sohbet
0
276
Member Avatar for Mayank23

[CODE=PHP] while($row = mysql_fetch_array($result) { echo "<img src='".$row['filepath']."'>"; echo "<br>"; echo "<a id='".$row['id']."' value='".$row['id']."' onclick='getrating();'>Likes: ".$row['likes']."</a>"; echo "<br>"; } [/CODE] [CODE=javascript] <script type="text/javascript" > function getrating(){ var x = document.getElementById("<?php echo $row['id']; ?>").value; alert(x) } </script> [/CODE]

Member Avatar for stbuchok
0
196
Member Avatar for whit89

go to w3schools.com and go to the php section and start learning. Then come back with what you have.

Member Avatar for whit89
0
135
Member Avatar for dean8710
Member Avatar for dean8710
0
156
Member Avatar for Stickie

This should help [URL="http://www.w3schools.com/ajax/default.asp"]http://www.w3schools.com/ajax/default.asp[/URL]

Member Avatar for fobos
0
493
Member Avatar for Tcll

if you have page a.htm. wich is the parent page with 2 iframes, you type in iframe a, and it reloads iframe b with the new text. is this your question? And you can only write in the header?

Member Avatar for Tcll
0
166
Member Avatar for peter20
Member Avatar for kukula

Did you set up your SMPT for the email so it knows how to send it? smpt: smpt_port:

Member Avatar for fobos
0
224
Member Avatar for serdas

its your localhost. Either 127.0.0.1 or your computer IP address

Member Avatar for manojsamtani
0
197
Member Avatar for GreaseJunkie

You have an error on line 11, you need to add ">" to then end of the image tag. Also try this. [CODE=PHP] ob_start(); session_start(); if(!isset($_SESSION['Username'])) { echo "<a href='http://www.test.com/signup.php'><img src='/images/register.png' alt='Please Register'/></a>"; } else { echo "<a href='http://www.test.com/thanks.php'><img src='/images/vote.png' alt='Vote'></a>"; } [/CODE]

Member Avatar for GreaseJunkie
0
4K
Member Avatar for ptara1

I could be wrong with the below statement in green. [CODE] date_default_timezone_set('America/New_York'); include 'connect.php'; $day = date('l'); $time = date('H:i:s'); [COLOR="Green"]// How to compare times if you do not include it in the select statement? You only have [COLOR="Red"]ID,ID,name[/COLOR].. No time or day is selected, so sql is only going …

Member Avatar for ptara1
0
209
Member Avatar for anonymous55

In my opinion, i think O'Reilly has the best books that cover a wide variety of subjects and things. Here are a couple that you would enjoy [URL="http://docstore.mik.ua/orelly/webprog/php/index.htm"]Programming PHP[/URL] [URL="http://docstore.mik.ua/orelly/webprog/pcook/index.htm"]PHP Cookbook[/URL] Also, php.net is a good reference and has a bunch of things.

Member Avatar for jcarbillon
0
217
Member Avatar for baig772

try using <?php $_SERVER['SERVER_ADDR']?>/admin/validateLogin/ in your form action.

Member Avatar for fobos
0
226
Member Avatar for Pravinrasal

Try this website [URL="http://arc.id.au/JsAnimation.html"]http://arc.id.au/JsAnimation.html[/URL]

Member Avatar for fobos
0
203
Member Avatar for mavrick4sky

Hi, found this on the web and tested it. [CODE] <script type="text/javascript"> <!-- function formatOutput(num) { if (num > 10) return parseInt(num); return num; } function validate(num, name) { if (isNaN(num)) { alert("Invalid input for " + name); return 1; } return 0; } function distance() { var lat_1 = …

Member Avatar for fobos
0
179
Member Avatar for dipusubhasis

Your going to have to post more of your codeing, because on line 1 [CODE=PHP] $appr2 = mysql_query("SELECT from_date FROM mrfs WHERE `mrf_id`='[COLOR="Red"]$row[0][/COLOR]'") or die (mysql_error()); [/CODE] im guessing you are running a sql query prior to that one? If you dont mind i have a suggestion [CODE=PHP] $result = …

Member Avatar for fobos
0
112
Member Avatar for anon0

if your getting Hello World '; ?> it means that its echoing part of of the string. if it wasnt working, 1) would be able to view the php page, 2) it would write it just as you have it <?php... ?>. just write it, but try phpinfo() first [CODE] …

Member Avatar for fobos
0
1K
Member Avatar for IanArcher

See if you can connect using this? [CODE] /* connect to gmail */ $hostname = '{imap.gmail.com:993/imap/ssl}INBOX'; $username = 'someone@gmail.com'; $password = 'yourpassword'; /* try to connect */ $inbox = imap_open($hostname,$username,$password) or die('Cannot connect to Gmail: ' . imap_last_error()); [/CODE]

Member Avatar for fobos
0
888
Member Avatar for BilalAKhan
Member Avatar for fobos
0
200
Member Avatar for as3g

Could your question be any broader? Try google. [url]http://www.w3schools.com/js/default.asp[/url]

Member Avatar for as3g
0
120
Member Avatar for swissknife007

[CODE] <html> <body> <?php if (isset($_REQUEST['email'])) //if "email" is filled out, send email { //send email $email = $_REQUEST['email'] ; $subject = $_REQUEST['subject'] ; $message = $_REQUEST['message'] ; mail("[COLOR="Red"]someone@example.com[/COLOR]", "$subject", $message, "From:" . $email); echo "Thank you for using our mail form"; } else //if "email" is not filled out, …

Member Avatar for pritaeas
0
227
Member Avatar for tjarmbruster

Here are some questions that may be answered: 1) Have you tried booting in safe mode? 2) After you reformated, were you able to log in? 3) Did you install a program, then the BSOD happened after restarting? 4) Maybe there is a hardrive failure or bad OS disc? Hopefully …

Member Avatar for fobos
0
69
Member Avatar for daniel36
Member Avatar for shailu.thakre
Member Avatar for daza166

try puting this in pageb.php function history(){ parent.checkHistory(); } <body onload="history()">

Member Avatar for fobos
0
243
Member Avatar for cr7489

In order to do this, we have to join the table when we execute the query. [CODE=PHP] <?php //Connection $query = "SELECT film.filmname, review.filmreview FROM film, review WHERE film.filmid= review.filmid"; $result = mysql_query($query) or die(mysql_error()); // Print out the contents of each row into a table while($row = mysql_fetch_array($result)){ echo …

Member Avatar for cr7489
0
181
Member Avatar for liphoso

If you want to insert data into 2 tables in the same database, then use UNION. If you have 2 databases, but same table name, 1) make sure you have the same fields, 2) use 2 connections for each database.

Member Avatar for fobos
0
110
Member Avatar for mitchiexlolz

If you installed MySQL, then you should have been prompted to insert a password. If it comes with WAMP, try using id = admin password = password or just id = admin, password = "BLANK".

Member Avatar for fobos
0
105
Member Avatar for 007tron

How is your database set up.. Are you storing the picture in a BLOB or locally?

Member Avatar for 007tron
0
210
Member Avatar for fobos

Hello everyone, i had a question on how to pull certain content from a website using PHP and cURL and dislay it on a page? So far from the web, this is all i was able to find out, but this just saves the coding into a text document. Lets …

Member Avatar for cereal
0
877
Member Avatar for shobe089

Thanks for the help cereal. i was trying to echo the website into $f, then pull the div by id. 1, how do i get the web content into a variable.. like $f = geturlcontent? then call the div. 2, can i use $t = $dom->getElementById($f); to get the div …

Member Avatar for fobos
0
545
Member Avatar for Dmennite
Member Avatar for karthik_ppts
0
622
Member Avatar for Wattsits

Try this attachment. It will tell you what port is being used and whats not. Next time, please post this in the correct forum. This has nothing to do with PHP, this is more of a software thing. On another note, google XAMPP. This is a really great bundle that …

Member Avatar for Wattsits
0
86
Member Avatar for ajijacobm

ajijacobm, the only way you are going to be able to use mysql with dynamic coding is by using server side code. HTML and javascript will not get what you want. You will have to use ASP, Coldfusion, PHP.. etc to achieve the results that you want. Now if you …

Member Avatar for ajijacobm
0
77
Member Avatar for mini programmer

Ok from what i see, you are calling a function from a button. The only problem is that the function itself is missing. do something simple like [CODE=javascript] function Cal() { alert("hi"); } [/CODE]

Member Avatar for mini programmer
0
114
Member Avatar for irandokht

Here is a link to what you are looking for. [URL="http://www.devarticles.com/c/a/JavaScript/Building-a-Dynamic-Menu-with-CSS-and-JavaScript-part-1/"]Click Here[/URL]

Member Avatar for fobos
0
96
Member Avatar for Brianbc

Try this. [CODE] $date = date("Y-m-d H:i:s"); INSERT INTO equardIPs (start) VALUES(" . $date . ") [/CODE]

Member Avatar for Brianbc
0
104
Member Avatar for fobos

Hey guys, i have looked all over the web on how to upload a file to MySQL database and retrieve using coldfusion. I know i can do it in PHP, but im not using that anymore. Is there a script or some place that someone can point me so i …

Member Avatar for arrgh
-1
983
Member Avatar for nats01282

I would suggest using $_SESSSION['first_name'] and so forth. And just like any webstie that has a login, just have a timeout or log out script to destroy the session.

Member Avatar for nats01282
0
105
Member Avatar for fobos

Hello, well i have a problem, i was wondering if there is a way to return a query in a function? This is what i have so far, but i get an error. [CODE] <cffunction name="select_query" access="public" returntype="any"> <cfargument name="as" type="string" required="yes"> <cfargument name="status" type="string" required="yes"> <cfset var sql = …

Member Avatar for arrgh
0
94
Member Avatar for Saion

I know this works in IE, because i use it all the time. Here is my code. Page1 is the main page with the iframe on it. The iframe ID will be "load_frame". Page1 [CODE=HTML] <html> <head> <script type="text/javascript"> function load_it(url) { document.getElementById("load_frame").src = url; } function adjust_iframe(h) { if(h==0) …

Member Avatar for fobos
0
2K
Member Avatar for SunnySideUp

Try this.. Your code seems fine, but i would question the "." in $target = "../pictures/".$imagename; before $imagename. [CODE=PHP] if(isset($_POST["input_name"])) { if (file_exists("../pictures/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { move_uploaded_file($_FILES["file"]["tmp_name"],"../pictures/" . $_FILES["file"]["name"]); echo "Stored in: " . "../pictures/" . $_FILES["file"]["name"]; } } [/CODE]

Member Avatar for fobos
0
108
Member Avatar for ivan3510

You would have to use the replace string. [CODE=JAVASCRIPT] var myString = "this is a string\n that needs \n\n to be on a newline"; var myString2 = myString.replace(/\n/g, "<br>"); document.write (myString2); [/CODE]

Member Avatar for ivan3510
0
82
Member Avatar for nwright

If you want it to check to see if the username is already in use, then you would have to use server side language ie..asp,cf, or php to check to see if the username has already been used by accessing the database and running a query.

Member Avatar for Taywin
0
199
Member Avatar for eswar.aspire

For 1), just create a php, cf, or asp page and call it swf_page.ext. Next set the CSS body, html, and swf height + width to 100%. Then embed the swf object. When you lauch the page, it should take up the whole screen. next make it where the params …

Member Avatar for eswar.aspire
0
191
Member Avatar for sajohnson05
Member Avatar for fobos

Good day all, well i have been searching the web and i cannot find an answer to my question. First off i dont know if i should post this here or in the Javascript section because i am a coldfusion user and didnt know if javascript does this. Second my …

Member Avatar for levine
0
114
Member Avatar for gtr1971

instead of [CODE] <a href="#" class="leftlinks" onclick="updateParent(control)" id="2" value="2">CLICK HERE</a> [/CODE] the value needs to be in the function on the link, because the function in the script requires a value. [CODE] <a href="#" class="leftlinks" onclick="updateParent(2)" id="2" value="2">CLICK HERE</a>[/CODE] Plus, just try to use [CODE] function updateParent(control) { window.opener.location.href="index.php?menukey="+control; } …

Member Avatar for gtr1971
0
12K
Member Avatar for znz

just use the delete method using the rows id [CODE] mysql_query("DELETE FROM table WHERE id='1'"); [/CODE]

Member Avatar for sops21
0
219
Member Avatar for kesh1000

If this is a registration form, try checking it against the database using a different method. [CODE] <?php $con = mysql_connect("localhost","peter","abc123"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("my_db", $con); $result = mysql_query("SELECT username FROM users"); while($row = mysql_fetch_array($result)) { //if the username matches any username in …

Member Avatar for fobos
0
88

The End.