1,376 Posted Topics

Member Avatar for jay_412

If you mean you want to store data in mysql/phpmyadmin then you will need to first open phpmyadmin. Then create a new database. In that new database create a new table. Then bingo php should be able to write into that table.

Member Avatar for darkagn
0
205
Member Avatar for francis123

I do that all the time but should be as follows: [CODE]php /home/[B]*****[/B]/public_html/ad/view.php[/CODE]

Member Avatar for francis123
0
96
Member Avatar for davidjennings

In future please use code tags as this is not your first post. Also the following code should do the trick: [CODE=php]$category_id=mysql_real_escape_string(stripslashes($_POST['category_id'])); $make=mysql_real_escape_string(stripslashes($_POST['make'])); $result = mysql_query("SELECT * FROM products WHERE products_make ='$make'") or die(mysql_error()); //or $resultb = mysql_query("SELECT * FROM products WHERE products_make ='$make' AND id ='$category_id'") or die(mysql_error());[/CODE]

Member Avatar for davidjennings
0
152
Member Avatar for 2bulent2

Well first of all, welcome to daniweb. And on future posts can you please use code tags (I know its your first time so I undertand). As for the problem, you will need a second php file just for deleting the mysql entries. First your while loop would look something …

Member Avatar for cwarn23
0
69
Member Avatar for Salem

Two bugs that I have found. One is that the emails sometimes show the raw html code instead of displaying the styled content. Could this be possibly something to do with the email headers. Also when viewing daniweb in the Opera browser, there is a minor bug with the bottom …

Member Avatar for MosaicFuneral
1
984
Member Avatar for becraig

There was a bug in your code. Try the following: [CODE=php]unset ($_REQUEST['login']); //quote fixed header ("Location: http://www.mysite.com/mypage.php");[/CODE]

Member Avatar for somedude3488
0
2K
Member Avatar for baudday

Try on line 34 the following code and tell us the results: [CODE=php]echo '<xmp>'; print_r($file_names); echo '</xmp>';[/CODE] That should dump the keys and values of the array. They don't always have numbers between the brackets.

Member Avatar for baudday
0
130
Member Avatar for mstrlouis

[QUOTE]print '<p class="sansserif"><b>Song title : </b> <a href="'.$lyrics.'">'.$title.'</a><br />';[/QUOTE] That line is incorrect and you will need to use something like the following if you haven't got a .htaccess file: [CODE=php]print '<p class="sansserif"><b>Song title : </b> <a href="index.php?id='.$title.'">'.$title.'</a><br />';[/CODE] The above code assumes your code is in index.php and to …

Member Avatar for cwarn23
0
136
Member Avatar for aashishn86

[QUOTE=aashishn86;980211]i just need help in configuring the apache server and mysql i have installed WAMP Server... when i go to phpMyAdmin i get this error : Error MySQL said: #1045 - Access denied for user 'root'@'localhost' (using password: NO) phpMyAdmin tried to connect to the MySQL server, and the server …

Member Avatar for aashishn86
0
247
Member Avatar for sarithak

Well if for example say [ICODE]$row['F_Name']="http://example.com/gallery/gallery.php"[/ICODE] then you would use the following: [CODE=php]echo '<a href="'.$row['F_Name'].'?variable='.$variable.'&id=2'.'">Link title</a>[/CODE] Then in that page you linked to place the following code [CODE=php]echo $_GET['variable']; echo '<br>'; echo $_GET['id'];[/CODE]

Member Avatar for diafol
0
107
Member Avatar for hemgoyal_1990

I have just checked+tested your script and your for loop works perfectly. However the 2 breaks; in your switch command may be prevent the for loop from working. I would suggest finding an alternative to using the switch command.

Member Avatar for hemgoyal_1990
0
694
Member Avatar for gouthamvel

Actually it should be as follows: [CODE=html]<option value="0" <?php echo ($installtype == "0" || $installtype == 0) ? "selected" : ""; ?> >Install with CPanel Info (can create MySQL DB automatically)</option>[/CODE]

Member Avatar for cwarn23
0
128
Member Avatar for tulipputih

I read that you have some tables and the layout of the tables. So exactly what is it your trying to do? Just that you haven't posted a question other than to solve the problem.

Member Avatar for tulipputih
0
196
Member Avatar for The Dude

Haha, it makes a fun game that hearing test. Might try it again to see if I can beat my score.

Member Avatar for edhardy
0
53
Member Avatar for sarithak

Try replacing your first function with the following: [CODE=javascript]//VOTE POLL ------------------------------------- function makeVote(url, parameters) { var http_request; try{ // Opera 8.0+, Firefox, Safari http_request = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch …

Member Avatar for diafol
0
101
Member Avatar for wandor

Try replacing line 42 of include/session.php with the following [CODE=php] $subtitle = trim($subtitle) if(strlen($subtitle) == 0){[/CODE]

Member Avatar for cwarn23
0
2K
Member Avatar for justted

I would suggest spreading the pictures over a couple of pages. This technique is called pagination. It would be better to spread the pictures over a few pages because using Ajax or Iframes will greatly reduce your search engine ranking. Also try resizing the pictures to half the size then …

Member Avatar for almostbob
0
125
Member Avatar for TechExpressInc

[QUOTE=Josh Connerty;978294]The first thing you must figure out is what IP the intranet is going to read, whether it be internal or external IP. Once you have found this out then it will be easier to use the IP to refer. If it reads internal then it is most likely …

Member Avatar for cwarn23
0
174
Member Avatar for ishlux

This problem just keeps on happening. There are 2 solutions. 1. Download xampp using other method (eg. there are 2 methods - exe and zip) 2. Use wamp instead. I myself have never had this problem with xampp so perhaps it is something with the latest version.

Member Avatar for cwarn23
0
91
Member Avatar for bravo21

I would suggest first doing a defrage then a checkdisk and see what happens then. The defrage can be found on the Start menu. In xp is in Start -> All Programs -> Accessories -> System Tools -> Disk Defragmenter Then checkdisk you will need to google for the appropriate …

Member Avatar for bravo21
0
161
Member Avatar for lllllIllIlllI

Well from what I know about big sites like Youtube, tags are generally used for keywords when searching for a topic. Can be usefull if there is no description but for daniwebs where there is only descriptions to search (unlike image content), I would say the tags are useless.

Member Avatar for cwarn23
0
63
Member Avatar for hbmarar

I have experimented with your problem and this appears to be a minor php bug. It seems to not handle negetive numbers properly. So to be able to do this job, you will need to make custom functions with loops that calculate the appropriate date. I will see what I …

Member Avatar for cwarn23
0
1K
Member Avatar for SYST3M4T1C

I can't see a single line of php code in the code you've posted. I would suggest downloading a php form script or using the following script instead. [CODE=php]<? if (isset($_POST['subject']) && $_POST['message']!=='') { $address = "your_real_email@domain.com"; //change this to the receiving address. $subject = "Website Email: ".$_POST['subject']; if ($_POST['name']!=='') …

Member Avatar for cwarn23
0
162
Member Avatar for sam023

[QUOTE=sam023;961553]i was wondering how to how seprate php from html while fetching rows from database.. [code] <?while($row=mysql_fetch_array($result)) {?> <td><?$row['firstname']?></td> <td><?$row['lastname']?></td> <?}?> [/code] can i separate php and html in above case.>? thank u[/QUOTE] If I was coding this it would look like the following: [CODE=php]<? while($row=mysql_fetch_assoc($result)) { echo '<td>'.$row['firstname'].'</td>'; echo …

Member Avatar for somedude3488
0
98
Member Avatar for pradeeprs

If you don't have a basic understanding then perhaps you should check out [URL="http://syntax.cwarn23.info/PHP:_Email_Form"]this article[/URL]. Also here is some source for basic usage: [CODE=php]<? if (isset($_POST['subject']) && $_POST['message']!=='') { $address = "your_real_email@domain.com"; //change this to the receiving address. $subject = "Website Email: ".$_POST['subject']; if ($_POST['name']!=='') { $body = "<table border=0 …

Member Avatar for cwarn23
0
105
Member Avatar for zekruss

Well curl on its own actually hasn't got anything to do with php. Curl is a programming language which can be found at [URL="http://en.wikipedia.org/wiki/Curl_(programming_language)"]wikipedia[/URL] and Curl is even a [URL="http://en.wikipedia.org/wiki/Curl_(mathematics)"]mathematics calculation[/URL]. So as you can see, the name Curl is known to be a number of things but the one …

Member Avatar for cwarn23
0
235
Member Avatar for srilakshmitr7

Perhaps instead of a live spell checker, instead have a spell check button which then uses ajax to check+correct the spelling. That would be the easiest way of doing it.

Member Avatar for diafol
0
112
Member Avatar for aerliana

The following code should do the trick: [CODE=php]<? echo date('j-n-Y'); ?>[/CODE]

Member Avatar for cwarn23
0
66
Member Avatar for vijaysoft1

[QUOTE=kkeith29;963416]Use google and search for bbcode classes.[/QUOTE] Why use classes when one long line of preg_replace will do the job. Using preg_replace once for the job will do the job better then what any class will ever do.

Member Avatar for cwarn23
0
134
Member Avatar for just asif

Try this: [CODE=php]<? $stringa='This is a test'; $stringb='This is a tests'; similar_text ($stringa,$stringb,$percent); echo round($percent,2).'%'; ?>[/CODE] Hope that helps.

Member Avatar for cwarn23
0
64
Member Avatar for chavansoft

[QUOTE]$fp = fopen($imgpath, 'w'); fwrite($fp, $store); fclose($fp);[/QUOTE] Try replacing that code with the following: [CODE]file_put_contents($imgpath,$store);[/CODE] A much more efficient function.

Member Avatar for cwarn23
0
120
Member Avatar for cwarn23

Hi and I'm no noob 2 ajax and have used it many times before. But for some reason this script doesn't want to work on any browser except Internet Explorer. Can anybody see what I have done wrong in this code as I have searched and searched for hours and …

Member Avatar for cwarn23
0
160
Member Avatar for Samir

Well file_get_contents() is the simplest solution and another solution is curl. However file_get_contents() only works if you place the http:// at the beginning of the address and the complete url. So for example try the following: [CODE=php]file_get_contents('http://newpics.huntsvillecarscene.co...BBAU&rand=8075');[/CODE]Hope that helps.

Member Avatar for Samir
0
126
Member Avatar for cwarn23

I was thinking of a new project for making a bot that scans daniweb for information and enters useful information into a database then people can ask the website questions and php+mysql will provide answers in paragraph form for the user to read. Is this ok on the legal side …

Member Avatar for cwarn23
1
303
Member Avatar for cwarn23

Hi, I found that my linux (CentOS) server hasn't got any of the php extensions installed but can't seem to find any easy way to do it. Can anybody guide me the easiest way to install the php extensions curl and gd. A google search has showen dozens of lines …

Member Avatar for cwarn23
0
651
Member Avatar for Dsiembab

I read the manual at php.net all the time. Just in case your wondering why it is because I like to try and find what I think is the best functions for the job. So that is one user that reads the manual before posting. -_- Next...

Member Avatar for GrimJack
0
199
Member Avatar for gcombe

Try replacing your code with this: [CODE=php]$query="SELECT * FROM player ORDER BY lname "; $result=mysql_query($query); echo "<option selected>-- Select Player --</option>"; if (mysql_num_rows($result)>0) { print("<option value=\"\">No Players On Roster</option>"); } else { while ($row=mysql_fetch_assoc($result)) { echo '<option value="'.$row['id'].'">'.$row['fname'].' '.$row['lname'].'</option>'; } } //mysql_close; ?>[/CODE]

Member Avatar for cwarn23
0
60
Member Avatar for ishlux

Well installing is just as easy as downloading if the download the right file. Download the xampp package and installation explains itself. Also after installing xampp you will need to go to the xampp control panel to turn on mysql and apache/httpd. The link for it is [URL="http://www.apachefriends.org/en/xampp.html"]http://www.apachefriends.org/en/xampp.html[/URL]

Member Avatar for Stefano Mtangoo
0
109
Member Avatar for coolest_987

Linux/Unix Note: After compiling the extension you will need to move the .so file to the extension directory then uncomment the extension from the php.ini file. After that you may restart apache then php should recognise the new modules/extensions. Just a thing I learn't when trying to get my extensions …

Member Avatar for cwarn23
0
194
Member Avatar for otakua

[QUOTE]Fatal error: Call to undefined function mssql_connect() in /home/otakua/public_html/index.php on line 26[/QUOTE] Usually that means that the module for that function has not been installed or been corrupted. So if you have uploaded to another server make sure the extension mssql is installed or if you believe it's already installed …

Member Avatar for cwarn23
0
157
Member Avatar for danielpataki

[QUOTE]Once I have the end variable is it advisable to unset() the ones I don't use any more? Does this just use up more resources than it gains?[/QUOTE]Well if it is a variable that is a few kilobytes in size and there is plenty of time left to execute then …

Member Avatar for cwarn23
0
169
Member Avatar for seangdy

session_start() and other headers must be sent before any browser output. So try the following: [CODE=php]<?php session_start(); ?><title>Hanuman Database</title> <div align="center"> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10"><img src="../images/bg_up_exp_left.GIF" width="20" height="20" /></td> <td width="722" background="../images/bg_up_experience.gif">&nbsp;</td> <td width="10"><img src="../images/bg_up_exp_right.gif" width="20" height="20" /></td> </tr> <tr> <td background="../images/left_bg.gif">&nbsp;</td> <td><table width="758" border="0" cellspacing="0" …

Member Avatar for seangdy
0
84
Member Avatar for servis

Try the following: [CODE=php]foreach ($link AS $links) { echo $links['f_name']; echo $links['l_name']; }[/CODE]

Member Avatar for blocblue
0
79
Member Avatar for lucky13

Well first I will have to ask are you on a shared server or dedicated server or vps (virtual private server). If your on a shared server then it should be your hosts responsibility to fix up the mail server as it requires modifying the php.ini and only the master …

Member Avatar for cwarn23
0
142
Member Avatar for vijaysoft1

A simple html error. Try this: [CODE=php]<body> <?php $time_now = mktime( date('h')+5, date('i')+30, date('s') ); $gmt1 = date('h:i:s A', $time_now); echo $gmt1; ?> <br> <br> <input name="textfield" type="text" disabled="True" value="<?php echo $gmt1; ?>" > </body>[/CODE]

Member Avatar for cwarn23
0
145
Member Avatar for caps_lock

Well to retrieve the entire page use file_get_contents() then preg_match_all() to filter to that table. Below is an example [CODE=php]<? $var=file_get_contents('http://superdialcouk.dmshop.biz/numbers/0207/choose.php?dmb1_SessRef=2009-08-22_15-29-14_8068_0003'); $var=preg_match_all('/<table class="vert_centered_leaded" style="width: 100%;".*<tr>.*<tr>.*<\/tr>(.*<\/table>)/Us',$var,$array); //print_r($array); $var='<table class="vert_centered_leaded" style="width: 100%;">'.$array[1][0]; unset($array); echo $var; ?>[/CODE]Usually I only use curl if it involves pinging or posting to a server.

Member Avatar for Dsiembab
0
164
Member Avatar for IrishHenshin

[QUOTE]Now there is a thread on here about it, but it's over 3 years old so I assume in the last 3 years there has been better development in this area.[/QUOTE] At last a newbie to the forums who didn't bump an old thread.:) As for the answer - xampp …

Member Avatar for IrishHenshin
1
118
Member Avatar for dmorrison

You had extra quotes in there. Try this: [CODE=php]include"../../pages/config.php"; $selectrow = mysql_query("SELECT * FROM members"); $query = mysql_fetch_array($selectrow, MYSQL_ASSOC); //Run business removal if ($query['Enable'] == "true"){ if ($query['autoRemove']<=0){ $removeSQL = "DELETE FROM AccLink WHERE autoRemove <= 0"; mysql_query($removeSQL); echo "Business Removed. {$query['username']}<br>"; } $remove1 = "Update AccLink SET autoRemove = …

Member Avatar for somedude3488
0
131
Member Avatar for srisree

[QUOTE]PHP Parse error: syntax error, unexpected T_VARIABLE in /home/mysite/public_html/guestbook/getdrawings.php on line 1[/QUOTE] I have tested the provided code both as it currently is and with many different modifications and from what I have found, although with single character changes errors can be made, I don't think that with this code …

Member Avatar for phpbeginners
0
655
Member Avatar for cali_dotcom

Try the following: [CODE=php]public function isIE() { $b = get_browser(null, true); if ($b['browser']=='IE') return true; else return false; }[/CODE]

Member Avatar for cali_dotcom
0
132

The End.