Noctagon
Members-
Posts
28 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
Noctagon's Achievements
Member (2/5)
0
Reputation
-
HI all, not sure if this is the right spot to ask this question but here goes. I have a password protected directory. I plan on using an excel macro to open a web browser to a particular web page within the password protected directory. I am just wondering if there is a way, just like when ftping, to specify in the url for the page the variables (username and password) so the user doesnt have to enter them. thanks
-
Hello everyone, I am looking for advice or suggestions on options for a system I am looking for. I am looking to have a whole stack of small audio files (probably mp3 format) on a server. I then need a system that creates an order of files to be joined (server side) then saved as a 1 merged file. As an example: Some code would take user input from a form and then generate a string that corresponds to files to be joined and in what order (File4, File23, File17, File7, etc). Then something server side would merge the files and save (as a new single file) the new file. Then, if at all possible, and I don't like my chances but you never know, that single merged file to be re-writen with another file merged to it on another audio track such that it complimented the existing file instead of being attached to the end of it. I look forward to any and all feedback and or suggestions. Cheers, Noc
-
From what i can conjure up it would look something like this???? $sql = mysql_query ("SELECT * FROM `projects` ORDER BY `col4` LIMIT 20"); echo "<table>"; goto here (not sure how to syntax it ) echo "<tr>"; set i = 1 while ($r = mysql_fetch_array($sql)){ echo "<td><a href=\"{$r['col3']}\"><img src=\"{$r['col1']}\" width=\"150\" height=\"150\" border=\"0\" longdesc=\"{$r['col2']}\" />[/url]</td>"; i = i+1 if i = 6 { echo"</tr>"; goto the goto here spot } } echo "</tr>"; echo "</table>"; Any one with some useful ammendments ???
-
Thanks, that does the trick.......ONLY 1 more thing to do now This gives me results that run vertically down the page, I did adjust the code so that for each 'while' it just adds a new cell not a new row. You guessed it...now it goes horizontally but off my page to the right, lol. How would i make it add a new row at every six cycles through the 'while'. So I would effectively have something like: $sql = mysql_query ("SELECT * FROM `projects` ORDER BY `col4` LIMIT 20"); echo "<table>"; echo "<tr>"; while ($r = mysql_fetch_array($sql)){ echo "<td><a href=\"{$r['col3']}\"><img src=\"{$r['col1']}\" width=\"150\" height=\"150\" border=\"0\" longdesc=\"{$r['col2']}\" /></a></td>"; -------> Now if 6 cells have been added to the row then start a new row <----------- } echo "</tr>"; echo "</table>";
-
Hmm, I put a quotation mark at the end of the long line I get an error which says: Parse error: syntax error, unexpected '{', expecting ',' or ';' in /home/mysite/public_html/projects.php on line 15 where line 15 is --> echo "<tr><td><a href="{$r['col3']}"><img src="{$r['col1']}" width="150" height="150" border="0" longdesc="{$r['col2']}" /></a></td></tr>"
-
Based on the code provided I guess I am looking for something like this (just not sure how to syntax it): $sql = mysql_query ("SELECT * FROM `projects` ORDER BY col4 LIMIT 20"); echo "<table>"; while ($r = mysql_fetch_array($sql)){ <td><a href="[col3]"><img src="[col1]" width="150" height="150" border="0" longdesc="[col2]" /></a></td> } echo "</table>"; Thanks
-
Yes mysql Yes db connected Yes for number 3 I am attempting to make the hyperlink associate to the pic so you click the picture to activate the hyperlink. Also the alt text will be associated to the pic too.....not in a cell next to it. When I use your code i get an error like this: Parse error: syntax error, unexpected '<' in /home/mysite/public_html/projects.php on line 15 --> line 15 is: <td>$r['col1']</td> // Picture Thanks.
-
Hello Everyone. I am looking for some assistance to generate a query/code to help me manage my various projects. The code needs to do the following once I have connected to my database (consider this step already complete): Get the following info out of the active database from the "projects" table. In the projects table I have 4 columns (well, 5 if you count my primary auto inc key). I need to extract col1 (this is in the form of http://www.mydomain.com/projects/1), col2 (this is a description of the project), col3 (this is also a hyperlink) with a limit of 20 and ordered by col4 (which is in the form of a date) Present the result of the query in a html table where each new cell represents 1 of the maximum 20 instances. So the first cell of the table will have a pic in it sourced from col1, the alt text for the pic will be from col2 and col3 will be a hyperlink associated to the pic. I really hope this makes sense. Please ask any questions for clarity. I really appreciate any help that can be given. Thanks in advance.
-
Hi all how do I format a variable. I have a variable ($vari) and it equals 123456 but I want it to display 123,456 when I echo the variable. Thanks :)
-
Hi all, I think I need to explain a little more :) I am TRYING to build a site where users can login......getting that bit done :) Once a user is logged in there will be a page that has a button on it.....when the button is clicked a little counter next to the button will increment by 1 for each click in real time.....this will be user specific.....so 10 users could be logged onto the site and each clicking there own button and being displayed only their clicks I will then be using the clicks value with PHP. Any assistance would be greatly appreciated as other suggestions have appeared to me to be not able to cope with users. Thank you :)
-
5.1.0 - Unknown address error 550-'Administrative prohibition'
Noctagon replied to Noctagon's topic in PHP Coding Help
OK, now I have the email being sent but it gets rejected with: Subject: Delivery Status Notification (Failure) The following message to <blah@blah.com> was undeliverable. The reason for the problem: 5.1.0 - Unknown address error 550-'Administrative prohibition' What could be causing this? -
5.1.0 - Unknown address error 550-'Administrative prohibition'
Noctagon replied to Noctagon's topic in PHP Coding Help
Hi mb81, I am not sure.....All I put in php.ini was smtp = mail.iinet.net.au how do I check if it is set up correctly.......through my mail client when I send emails I do not have the box ticked which says server requires authentication. -
Hi all I am using this tutorial for a members system. http://www.phpfreaks.com/tutorials/40/3.php It seems to be working fine all the way up to when this part of the code executes... [code] mail($email_address, $subject, $message, "From: MyDomain Webmaster<admin@mydomain.com>\n X-Mailer: PHP/" . phpversion()); echo 'Your membership information has been mailed to your email address! Please check it and follow the directions!'; [/code] It tries to send the email, it echos out the 'Your membership....message' and then I get an email which says: [quote]Subject: Delivery Status Notification (Failure) The following message to <email@signupemailaddy.com> was undeliverable. The reason for the problem: 5.1.0 - Unknown address error 550-'Administrative prohibition'[/quote] NB: I did substitute the email for this post :) Any ideas on what might be causing this error. I am running the script from localhost and have gone into the php.inin file and changed the mail settings to my outgoing smtp server. Thanks, Noctagon :)
-
array problem....I think...though its probably just me :)
Noctagon replied to Noctagon's topic in PHP Coding Help
That looks like the same code to me :) I actually omited something any way...this is the code I was using: [code]$query = 'SELECT SUM(votes) FROM vote_table where user_id="1"'; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); while ($tvotes = mysql_fetch_array($result)) { if ($tvotes['vote_table'] < 1000) { $votecolour = '<b><font color=black>Black</font></b>'; } else { if ($tvotes['vote_table'] < 5000 and $tvotes['vote_table'] >= 1000) { $votecolour = '<b><font color=blue>Blue</font></b>'; } else { $votecolour = '<b><font color=red>Red</font></b>';[/code]