Problem with user profiles

  • (2 Pages)
  • +
  • 1
  • 2

21 Replies - 417 Views - Last Post: 10 July 2013 - 10:04 AM Rate Topic: -----

#16 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9287
  • View blog
  • Posts: 34,808
  • Joined: 12-June 08

Re: Problem with user profiles

Posted 10 July 2013 - 09:47 AM

If you IDE does not have a inline debugger the next best thing is to try and put echo outputs in that file.. see if you can narrow down _WHERE_ the code is failing, right? Have it output variables so you know the data going in.. start tracing through the code, narrow in on the fugitive bug, and squash it!
Was This Post Helpful? 0
  • +
  • -

#17 mathiaskruse  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 10-July 13

Re: Problem with user profiles

Posted 10 July 2013 - 09:51 AM

View Postmodi123_1, on 10 July 2013 - 09:47 AM, said:

If you IDE does not have a inline debugger the next best thing is to try and put echo outputs in that file.. see if you can narrow down _WHERE_ the code is failing, right? Have it output variables so you know the data going in.. start tracing through the code, narrow in on the fugitive bug, and squash it!


But in this case where a simple button isn't working, where would i echo?
I mean, its like the button doesn't react. So, i feel like if the button did work, but something else didn't the button would send me like an error? :P

or am i completely wrong ?
Was This Post Helpful? 0
  • +
  • -

#18 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9287
  • View blog
  • Posts: 34,808
  • Joined: 12-June 08

Re: Problem with user profiles

Posted 10 July 2013 - 09:53 AM

Okay.. so in the last post you said nothing comes up - implying the form/button triggers the php page. If that is not the case then you need to be clear about what is happening.

If you are using the typical html form - when you click the submit button it should transition you to the page you told it to.. if that is not happening then it is high time to look at your form/button code.
Was This Post Helpful? 0
  • +
  • -

#19 mathiaskruse  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 10-July 13

Re: Problem with user profiles

Posted 10 July 2013 - 09:57 AM

So, what you are saying is that because my button sends me directly to a PHP if statement, my problem would lie somewhere in the PHP statement meaning that it isn't executed ? :)
Was This Post Helpful? 0
  • +
  • -

#20 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9287
  • View blog
  • Posts: 34,808
  • Joined: 12-June 08

Re: Problem with user profiles

Posted 10 July 2013 - 09:57 AM

... or am I seeing that right where you have the HTML form code in the same file as the PHP? You would, most likely, want to do client side validation with some javascript and push the php into its own file. A separation of duties and what not.
Was This Post Helpful? 0
  • +
  • -

#21 mathiaskruse  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 10-July 13

Re: Problem with user profiles

Posted 10 July 2013 - 10:01 AM

Jeez, so you are telling me to learn a whole other language aswell :P? Dam things in this programming world is quite hardcore. Anyhow I'm taking a break for a lil' while. Returning in an hour or two.

Thanks alot for your help so far :)

Btw, if i seperate the PHP, do i use this:
<?php require 'somename.php'; ?>
?
Was This Post Helpful? 0
  • +
  • -

#22 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9287
  • View blog
  • Posts: 34,808
  • Joined: 12-June 08

Re: Problem with user profiles

Posted 10 July 2013 - 10:04 AM

Typically you would tell the form tag where to go when action occurs.


Quote

Jeez, so you are telling me to learn a whole other language aswell

Sure.. what you are attempting to do is validate the client input on the server.. remember HTML is client side, PHP is server side, and Javascript is client side.

All I am advocating is separating out things makes debugging easier.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2